DynamicField.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 the sort expression that is used when the data field is used to sort the data source by.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public override string SortExpression { get; set; }

Property Value

Type: System.String

The sort expression that is used when the data field is used to sort the data source by.

Exception Condition
InvalidOperationException

The DynamicField object is inside a data-bound control that is not bound to a data source control that implements the IDynamicDataSource interface.

The SortExpression property tries to use the value of the MetaColumn.SortExpression property of the column object that is associated with the DynamicField object by setting the DataField property.

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.

.NET Framework
Available since 3.5
Return to top
Show: