-->

06 February 2020

Asp.Net GridView Control Events

  Asp.Net CS By Example       06 February 2020
 GridView Control Events 

 The GridView control includes a rich set of events that we can handle to customize the control’s behavior and appearance. These events can be divided into three groups.

 First, the GridView control supports the following set of events raised when the control displays its rows:

Sr.No Property Description
1) DataBinding Raised immediately before GridView is bound to its data source.
2) DataBound Raised immediately after GridView is bound to its data source
3) RowCreated Raised when each row in GridView is created
4) RowDataBound Raised when each row in GridView is bound to data

 Second, the GridView control includes the following set of events raised when we edit records:

Sr.No Property Description
1) RowCommand Raised when an event is raised by a control contained in GridView
2) RowUpdating Raised immediately before GridView updates a record
3) RowUpdated Raised immediately after GridView updates a record
4) RowDeleting Raised immediately before GridView deletes a record
5) RowDeleted Raised immediately after GridView deletes a record
6) RowCancelingEdit Raised when we cancel updating a record

 Finally, the GridView control supports the following events related to sorting, selecting, and paging:

Sr.No Property Description
1) PageIndexChanging Raised immediately before the current page changes
2) PageIndexChanged Raised immediately after the current page changes
3) Sorting Raised immediately before sorting
4) Sorted Raised immediately after sorting
5) SelectedIndexChanging Raised immediately before a row is selected
6) SelectedIndexChanged Raised immediately after a row is selected
logoblog

Thanks for reading Asp.Net GridView Control Events

Previous
« Prev Post

No comments:

Post a Comment

Please do not enter any spam link in the comment box.