Difference between rowediting and rowupdating in gridview

I tend to use business objects in my applications so using the standard data controls doesn't work very well, nor would it really buy much in terms of abstraction.

In my code I tend to write the databinding logic as part of the page logic which usually is just a couple of lines of code.

Oddly I have no idea why the data item would not be available given that this particular grid is bound to a Data Table which has persistent backing and is live on the form.

The problem with the button field is that it's very limited in functionality.

Again it seems odd given that we are firing a ROW level Row Command event that there's not an easier way to get row level context even when we are using a Command argument.Doesn't it seem very redundant to have to go through all of this just to get at the underlying data item?It seems to me that Grid View Event Args could have included a consistent mechanism to expose both the Data Item Index as well as the Data Item itself.Using Template fields with Command Argument and Command Name also fires the fires the same Row Command event on the Data Grid.But the handling of the Grid View Command Argument is quite different.Template Columns and Commands If something more dynamic is required you need to use template fields.

980

Leave a Reply