Hi.....
I am creating a data table dynamically which has 10 rows and binding that table to Gridview.
In Gridview, I am having 4 dropdownlist, 5 textbox and 1 label controls .
here i want to give clientside validations using javascript for textbox but I am unable to find the textbox control of a gridview using javascript.
please help..
Loading
CrishPosted Dec 10, 2010, 5:32 AM
I had same problem.You have to check following code i think it will help you.
Manikavelu VelayuthamPosted Dec 10, 2010, 2:53 AM
http://www.c-sharpcorner.com/uploadfile/purankaushal/gridjavascript05212008014115am/gridjavascript.aspx
Another way.
1. Find the textbox control in the RowDataBound or ItemDataBound event of the grid view.
2. Add the attributes to that textbox like.. Textbox1.Attributes.Add("OnClick", "Javascript function name");
3. In the javasscript function, you can implement your client side validation.