GridViewSortEventArgs::SortExpression Property
Gets or sets the expression used to sort the items in the GridView control.
Assembly: System.Web (in System.Web.dll)
When the Sorting event is raised, you can use the SortExpression property to determine the sort expression that will be used to sort the GridView control when sort operation is performed. By default, the GridView control sorts a single column at a time. The sort expression simply contains the name of the field to sort. You can also sort multiple columns at a time by programmatically setting this property to a comma-separated list of field names.
The following example demonstrates how to use the SortExpression property to determine which column in a GridView control is being sorted. If the user attempts to sort the address column, the sort operation is canceled.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.