Gridview rowupdating code in c

For the user to be able to check the checkbox, it needs to be a Template Field.

For example: Now this does get the control that is in the Item Template, not the Edit Item Template.

It will not find it, you need to be more specific than that.

A very important note, in order to get the control in the Edit Item Template, then the Grid View must be in Edit mode.

when i use smart tag, upon loadng of the page, it queries all data in the db and show it to the page i don't want that to happen.

i mean i could hide the gridview upon loading but still, it would query the sql db and i don't want the server to have that burden.

Background I am sharing this because I see in the forums a lot of questions based on how to get the value from the gridview object, and I know the reason behind that.it would only do a query once user enters strings to textbox or enters text file to parse. Also, i already did the msgbox() to output controls in gridview in row updating event to make sure the gridview is in edititemtemplate (or so i think it is) and didn't show any control id.Also, the fourth column is already a template field.In order to get to the Edit Item Template, you need to first create a Template Field column.Using Template Fields in the Grid View Control eclipsed4utoo was on the right track, as far as how to get to the controls. But since the controls are buried in a Template Field, you cannot just do a find control on the Row.

Leave a Reply