Uses Most data controls support writing custom commands and handling some Command event(Row Command for Grid View).

This method would come in handy if you needed to get the values out of the Grid View for some custom command you wanted to execute.

A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.

asp net gridview rowupdating new values empty-59

If you go with the flow, you probably won't get stuck, but the moment you try to go against the grain you end up with a hand full of thorns.

Most of the data controls have events ending in ing and ed e.g. In most of the event handlers of the ing events it is easy to get the values from the event args.

After you've created a layout with a data control of your choice and eventually bound them to some datasource, you almost always want to get that data back out of them(and why wouldn't you, its your data).

One thing you'll learn about developing webpages is that its like petting a porcupine (yikes).

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.event is raised when a row's Update button is clicked, but before the Grid View control updates the row.This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.I Often see people abusing find control and not understand that it is NOT recursive by default and complain when code like this Throws a null reference exception.My advice is use Use Find Control as a last resort.From the time you write code that depends on the immediate layout of your page then your asking for trouble.