GridView::SortExpression Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the sort expression associated with the column or columns being sorted.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
[BrowsableAttribute(false)]
property String^ SortExpression {
	virtual String^ get();
}

Property Value

Type: System::String^

The sort expression associated with the column or columns being sorted.

Use the SortExpression property to determine the sort expression associated with the column or columns being sorted.

System_CAPS_noteNote

The GridView control has a built-in sorting feature that automatically sets this property. This property is typically used only when you need to programmatically determine the column or columns being sorted or when you are adding your own custom sorting functionality to a GridView control.

When multiple columns are sorted, this property contains a comma-separated list of the fields by which to sort.

The following example demonstrates how to use the SortExpression property to determine the name of the column being sorted.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: