Validators inside GridView
-
Hi Friends, I am using GridView. Therein , i am making edit, addnew,delete all the three functions. Now i am using Validators for the TextBoxes. I am putting Validators in FooterTemplate for Addnew TextBoxes and in EditTemplate for Edit TextBoxes. The Validators work for once. That is if i click AddNew LinkButton it will give me the Error message, but once i use Edit or Update and then try it again. It doesnt work. I think it is losing the ClientID of the textbox? I am not sure, but i felt so. Because earlier i was using the Ajax ValidatorCallout, which was displaying me Javascript Error message in this situation that, ControlToValidate is null. Yes i even tried simple JavaScript Eg: var NewName NewName = document.getElementById("ctl00_ContentPlaceHolder1_GVGuide_ctl05_txtNewName"); alert(NewName); for above line it is not able to Get the Control, NewName is always NULL and $get('<%=txtNewPhone.ClientID %>').innerText; this one above code gives me error txtNewPhone doesnt exist, which is inside the GridView. I am really lost... All i am trying to do is get a decent grid which can work with validators. Any Suggestion or Help would be highly appreciated. If you need to see my code in detail please let me know i will post it here. Thanks
Cheers Menon