This is because the Text Box is in the Edit Item Template and that is what we need to validate.If you put the Required Field Validator in any Item Template or any other Template supported by Grid View you will recieve an error saying that Grid View is unable to find the control to validate.I will also show you that how you can use validation against the Drop Down List control which is contained inside the Grid View control.
For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.
In this article we create a Gridview from database and add some additional operations such a add, edit and delete data in the Grid View control.
The Category ID and Category Name are the Bound columns which are bound to the "Category ID" and "Category Name" fields in the Categories table in Northwind Database.
The "Description" and "Choose" columns are template columns.
I'm using a databound grid view (below) to edit with -when I click the edit button I see the Edit Item Templates all correctly populated, but when I press the Update button - I am told "cannot find control DDLCategory Edit in Control Parameter Edit Category ID - I have tried changing the control ID to ct100$Main Content$Grid Viewgory ID but no change and now I'm thinking I need to put a findcontrol in the code behind - but i'm not sure how to access the Edit state of the gridview to say something like: protected void Grid View1_Row Data Bound(Obj My apologies for such a long delay, I think I've led us on a bit of a wild goose chase.
When I set up my databound grid I hadn't called up the key identity so as soon as I started to call up row related changes of course I was running into the problems above.Not sure if i'm doing this right but I'm getting the text 'Command Argument' underlined "does not contain a definition for 'Command Argument' and am I missing a using directive or an assembly reference etc". Rows(rowindex) I am told it is a non-invocable member and cannot be used like a method...protected void Grid View1_Row Data Bound(obj if I write the code as below it appears not to error but I still get my original error when I click the update button so it appears not to have resolved anything either: protected void Grid View1_Row Data Bound(obj As before it seems ok in the code behind but still when I click the update button I get the same message...Export Button is a custom control that let's you export your Data Grid or Text Box data to several different formats.The control is extremely easy to use and also exposes design time features.One note will be helpful for you, while describing Columns in Grid View if you are using a boundfield then create objects of the control using cells[index] in the rowupdateing event of Grid View, but if you are using controls itself like Label or textboxes etc then use Fincontrol("stringid").