Is anybody know how to validate(using javascript) a textbox inside datagrid
-
hi friends, i don't know how to validate(using javascript) a textbox control inside a datagrid.please help me i am new to this.
-
What kind of validation are you trying to do? I have used the asp.net controls for validation (required field, and compare) on textboxes within a grid to ensure a valid email was entered with no problem.
-
i want to use javascript validation.The textbox(inside the datagrid) should not accept special characters like @#^&|\/%~`
Hiii Dear, If ur using server side textbox control then u write following code in ItemDataBound event of the datagrid for binding ur javascript function to textbox. e.Item.Cells(0).Controls(1).Attributes("Onblur") = String.Format("ValidateText({0});", this.ClientID) This will call the ValidateText function for textboxe on which onblur event fires.In that function you can mention one RegExp object for the further validation. It will help you.:) Unmon
-
Hiii Dear, If ur using server side textbox control then u write following code in ItemDataBound event of the datagrid for binding ur javascript function to textbox. e.Item.Cells(0).Controls(1).Attributes("Onblur") = String.Format("ValidateText({0});", this.ClientID) This will call the ValidateText function for textboxe on which onblur event fires.In that function you can mention one RegExp object for the further validation. It will help you.:) Unmon