System.Web.UI.WebControls.DataGridSortCommandEventHandler Delegate

Represents the method that handles the DataGrid.SortCommand event of the System.Web.UI.WebControls.DataGrid control.


public delegate void DataGridSortCommandEventHandler (object sender, DataGridSortCommandEventArgs e)


Documentation for this section has not yet been entered.
Documentation for this section has not yet been entered.


When sorting is enabled by setting the DataGrid.AllowSorting property of the System.Web.UI.WebControls.DataGrid control to true, System.Web.UI.WebControls.LinkButton controls are rendered in the header of each column. These links allow you to sort the System.Web.UI.WebControls.DataGrid control by the selected column. The DataGrid.SortCommand event is raised when a System.Web.UI.WebControls.LinkButton control is clicked.

When you create a System.Web.UI.WebControls.DataGridSortCommandEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see Events and Delegates.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,