Gridview rowupdating not working unique dating profiles

The gridview would pass all of the old values to the update proc.

gridview rowupdating not working-28

Specifically, I needed to find all duplicate records in the table, but keep the first of each of the duplicate records.

The table also contained several rows of detail information that was different for each entry, but I only wanted to keep whatever detail information that the first of each of the duplicate records contained.

If we move our mouse on to the variables, which hold the cell values, we can see the old value instead of new updated value (Refer the debugging Screen Shot at the Top).

event is raised when a row's Update button is clicked, but after the Grid View control updates the row.

You can also indicate whether the exception was handled in the event-handling method by setting the On Row Updated Row Canceling Edit On Row Canceling Edit Row Deleted On Row Deleted Row Deleting On Row Deleting Row Editing On Row Editing Row Updating On Row Updating Grid View Class System.

I am using a Template Field to display my Edit, Update and Cancel 'buttons' in the first column of the Grid View within respective Item Template and Edit Item Template fields.protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) For more details then refer to this link below using an Sql Data Source that allows updating, as his code shows, it should automatically rebind after a successful update. Row Updating event handler, you would be binding before the update has occured. The weirdest thing is, I have two buttons in my grid - 'Enable' and 'Disable', where only one is displayed at a time based on the value of a bit field in my database and simply toggle this value when clicked.The 'Enable' button works just fine, but when I click the 'Disable' button nothing happens.I am sure I do not have any typos and the logic is correct. I suspect that you changed the query in your data source, or, perhaps, specified or unspecified a key field such as the table's primary key.Check the value of the Grid View's Data Key Names property.Description: An unhandled exception occurred during the execution of the current web request.

Tags: , ,