This documentation is archived and is not being maintained.

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:
virtual property String^ SortExpression {
	String^ get () override;
	void set (String^ value) override;
}

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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5 SP1
Show: