Gridview rowupdating get new value

Unfortunately these dictionaries are only filled out if you are bound to a datasource control :(.

So that means when you bind to some raw collection and hook up to the Data Source property then call databind, if you try to handle the delete or update events these dictionaries are going to be empty.

There is alot of magic going on behind the scenes (which I will blog about in a separate post), but you do not need to know how it works to use it, e.g expression then the value of the Text property is pushed into a dictionary which the data control can retrieve later.

So how does Grid View/Form View/Details View/List View get these values?

From the time you write code that depends on the immediate layout of your page then your asking for trouble.

I'd like to know if there are any other ways to retrieve the new values?

Forgive me for the variation in my code formatting I'm trying to find the right one.

If we look at this event we can see the Grid View nicely packages for us the new values, old values and the keys for the updating row.

I know its very annoying and hard to get the data out of the data controls (gridview in this case), but there are other things you can do to make it easier.

For example a Sql Data Source, which is automatically added to your Web Form if you drag-n-drop your way around Visual Studio 2005.

Leave a Reply

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

One thought on “gridview rowupdating get new value”

  1. You love it I know I will what u waitin for Tell me your dirtiest ideas TEXT 07860 063 667Age 18 London good Catholic girl gone bad I want experienced guy to tell me all his dirty thoughts Ill do same TEXT 07860 063 459Age 18 Wolverhamptoncute ass honey luv talking dirty.