Row updating event in grid view

However, most of the real world cases call for validating the data being edited or deleted. Drag and drop an SQL Data Source control on the web form.There can be several approaches taken for validating data. For our example we are going to use Customers table of Northwind database. Open its smart tag and choose "Configure Data Source" option to start Configure Data Source wizard.On the next step select Customer ID, Company Name, Contact Name and Country columns (Figure 2).

row updating event in grid view-29

A Grid View Updated Event Args object is passed to the event-handling method, which enables you to determine the number of rows affected and any exceptions that might have occurred.

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.

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

This enables you to provide an event-handling method that performs a custom routine, such as checking the results of the update operation, whenever this event occurs.

Debugger Inside Grid View Row Updating Event " data-medium-file="https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=300" data-large-file="https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=800&h=359 800w, https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=150&h=67 150w, https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=300&h=135 300w, https://taditdash.files.wordpress.com/2014/06/debugger-inside-gridview-rowupdating-event.png? w=768&h=345 768w, https://taditdash.files.wordpress.com/2014/06/864w" sizes="(max-width: 800px) 100vw, 800px" /Grid View on Browser " data-medium-file="https://taditdash.files.wordpress.com/2014/06/gridview-on-browser.png? w=230" data-large-file="https://taditdash.files.wordpress.com/2014/06/gridview-on-browser.png? w=150 150w" sizes="(max-width: 230px) 100vw, 230px" /Grid View Cell Showing Updated Value " data-medium-file="https://taditdash.files.wordpress.com/2014/06/gridview-cell-showing-updated-value.png? w=300" data-large-file="https://taditdash.files.wordpress.com/2014/06/gridview-cell-showing-updated-value.png? w=150 150w, https://taditdash.files.wordpress.com/2014/06/gridview-cell-showing-updated-value.png? w=300 300w" sizes="(max-width: 416px) 100vw, 416px" /Event.

Last modified 22-Jan-2017 06:35