DataControlField::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 or sets a sort expression that is used by a data source control to sort data.

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

public:
[TypeConverterAttribute("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
property String^ SortExpression {
	virtual String^ get();
	virtual void set(String^ value);
}

Property Value

Type: System::String^

A sort expression that is used by a data source control to sort data. The default value is an empty string ("").

The OnFieldChanged method is called to raise a state change event when the SortExpression property is set.

The value of the SortExpression property is stored in view state.

The following code example demonstrates how to use the SortExpression property to assign a sort expression to a data control field.

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

.NET Framework
Available since 2.0
Return to top
Show: