asp.net.ph

GridView.Sorting Event

System.Web.UI.WebControls Namespace   GridView Class


.NET Framework version 2.0

Occurs when the linkbutton to sort a column is clicked, but before the GridView control handles the sort operation.

[ VB ]
Public Event Sorting As GridViewSortEventHandler

[ C# ]
public event GridViewSortEventHandler Sorting;

[ C++ ]
public: __event GridViewSortEventHandler* Sorting;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Remarks

The Sorting event is raised whenever any of the LinkButton controls used for sorting a GridView 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 sort operation, whenever this event occurs.

Event Data

The method assigned to handle the event is passed an argument of type GridViewSortEventArgs object containing data related to this event. The following GridViewSortEventArgs properties provide information specific to this event.

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled ( inherited from CancelEventArgs )
SortDirection Gets or sets the direction in which to sort the GridView control.
SortExpression Gets or sets the expression used to sort the GridView control.

See Also

GridView Members   AllowSorting   GridViewSortEventArgs   GridViewSortEventHandler Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph