GridView.Sorting Event
.NET Framework 3.0
Occurs when the hyperlink to sort a column is clicked, but before the GridView control handles the sort operation.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The Sorting event is raised when the hyperlink to sort a column is clicked, but before the GridView control handles the sort operation. This allows you to provide an event-handling method that performs a custom routine, such as canceling the sorting operation, whenever this event occurs.
A GridViewSortEventArgs object is passed to the event-handling method, which allows you to determine the sort expression for the column and to indicate that the selection operation should be canceled. To cancel the selection operation, set the Cancel property of the GridViewSortEventArgs object to true.
For more information about handling events, see Consuming Events.
Community Additions
ADD
Show: