Export (0) Print
Expand All

DynamicField.SortExpression Property

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.

ExceptionCondition
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

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft