GridView Events
.NET Framework 3.0
| Name | Description | |
|---|---|---|
| DataBinding | Occurs when the server control binds to a data source. (inherited from Control) |
| DataBound | Occurs after the server control binds to a data source. (inherited from BaseDataBoundControl) |
| Disposed | Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested. (inherited from Control) |
| Init | Occurs when the server control is initialized, which is the first step in its lifecycle. (inherited from Control) |
| Load | Occurs when the server control is loaded into the Page object. (inherited from Control) |
| PageIndexChanged | Occurs when one of the pager buttons is clicked, but after the GridView control handles the paging operation. |
| PageIndexChanging | Occurs when one of the pager buttons is clicked, but before the GridView control handles the paging operation. |
| PreRender | Occurs after the Control object is loaded but prior to rendering. (inherited from Control) |
| RowCancelingEdit | Occurs when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode. |
| RowCommand | Occurs when a button is clicked in a GridView control. |
| RowCreated | Occurs when a row is created in a GridView control. |
| RowDataBound | Occurs when a data row is bound to data in a GridView control. |
| RowDeleted | Occurs when a row's Delete button is clicked, but after the GridView control deletes the row. |
| RowDeleting | Occurs when a row's Delete button is clicked, but before the GridView control deletes the row. |
| RowEditing | Occurs when a row's Edit button is clicked, but before the GridView control enters edit mode. |
| RowUpdated | Occurs when a row's Update button is clicked, but after the GridView control updates the row. |
| RowUpdating | Occurs when a row's Update button is clicked, but before the GridView control updates the row. |
| SelectedIndexChanged | Occurs when a row's Select button is clicked, but after the GridView control handles the select operation. |
| SelectedIndexChanging | Occurs when a row's Select button is clicked, but before the GridView control handles the select operation. |
| Sorted | Occurs when the hyperlink to sort a column is clicked, but after the GridView control handles the sort operation. |
| Sorting | Occurs when the hyperlink to sort a column is clicked, but before the GridView control handles the sort operation. |
| Unload | Occurs when the server control is unloaded from memory. (inherited from Control) |
Reference
GridView ClassSystem.Web.UI.WebControls Namespace
BoundField
ButtonField
CheckBoxField
CommandField
DataGrid
DetailsView
FormView
HyperLinkField
ImageField
SqlDataSource
TemplateField
GridView.AllowPaging Property
GridView.AllowSorting Property
GridView.AutoGenerateColumns Property
GridView.AutoGenerateEditButton Property
GridView.AutoGenerateSelectButton Property
GridView.Columns Property
System.Web.HttpServerUtility.HtmlEncode
Other Resources
Accessing Data with ASP.NETData Source Controls Overview
ASP.NET Data Source Control Parameters
Community Additions
ADD
Show: