Home / dating chinese women for western men / Get datakey value gridview rowupdating event

Get datakey value gridview rowupdating event

"If you like my work; you can appreciate by leaving your comments, hitting Facebook like button, following on Google , Twitter, Linked in and Pinterest, stumbling my posts on stumble upon and subscribing for receiving free updates directly to your inbox . Datagrid(1.1) to Grid View(2.0) and using the Row Updating event how to extract the values from the controls. In Custom Control, Grid View Row Updated event not getting called.Problem getting new value in gridview's Row Updating event I have a dynamically created gridview, it's autogeneratedcolumns is set to True, and it databinds on every postback.Now, when an user edit a row then click update, I'm having problem getting the new values in gridview's rowupdating event, it always returns the old values.when I execute an On Selected Index Changed in the Grid (for when I load my data), they datakey is passed fine.But when I do it in the Row Command argument, I am always getting the attached error. Thanks, Peter "The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years.

get datakey value gridview rowupdating event-78get datakey value gridview rowupdating event-60

I am using the Update feature of the SQLData Source to update a SQL Server database with values entered into the gridview. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview.

What I want is to be able to update a user's roles based on the selections in those checkboxes.

I'm approaching this by writing some code for the Grid View's Row Updating event.

but I always am getting the same error (Index out of Range).

Here is the Gridview that displays the data: The weirdest part of all this is ...


  1. When the DataKeyNames property is set, the GridView control automatically creates a DataKey object for each row in the control using the value

  2. Using DataKeyNames in the GridView. event on the GridView. The purpose of doing this is to show you how to retrieve the DataKey value from the GridView.

Leave a Reply

Your email address will not be published. Required fields are marked *