Gridview edit mode rowupdating

Rated 3.80/5 based on 610 customer reviews

Then it's grid View Users_Row Updating event and grid View Users_Row Deleting event. I have two optional parameters here which will get query type and the query.If the query type is "UPDATE" or "DELETE", it will execute the query and in the finally block it will bind the Grid View. LOL Each time through the code behind I was loading and binding my product table.I have a break on the Sub statement for the Row Updating handler ... The Edit and Cancel buttons fire the Row Command event, however, the Update button does not. No breakpoint was triggered when I hit the Update button. I truly appreciate all the suggestions you've given.

For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.

I don't need to write any custom code and all the columns I have selected in my query will be appeared as it is in my Grid View.

Ok, Now what my target is, I will have some rows in my Grid View and initially it will be read only.

I have used image buttons here to make the UI bit nicer. Then I am assigning that row number to Grid View's Edit Index property which will put the appropriate row into the Edit Mode.

Then I am calling my custom method which I am going to write in few minutes and it will bind the Grid View again.

Leave a Reply