Back to Devexpress

WcfInstantFeedbackSource.DefaultSorting Property

corelibraries-devexpress-dot-data-dot-wcflinq-dot-wcfinstantfeedbacksource-d25229f6.md

latest2.4 KB
Original Source

WcfInstantFeedbackSource.DefaultSorting Property

Specifies how data source contents are sorted by default, when the sort order is not specified by the bound control.

Namespace : DevExpress.Data.WcfLinq

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[DefaultValue("")]
public string DefaultSorting { get; set; }
vb
<DefaultValue("")>
Public Property DefaultSorting As String

Property Value

TypeDefaultDescription
StringString.Empty

The string which contains the column name(s) against which data source contents are sorted and the sort order(s).

|

Remarks

This property accepts a string containing a column name followed by the sort order - “ASC” (ascending) or “DESC” (descending).

csharp
dataSource.DefaultSorting = "UnitPrice DESC";
vb
dataSource.DefaultSorting = "UnitPrice DESC"

Columns are sorted ascending by default - “ASC” can be omitted.

csharp
dataSource.DefaultSorting = "Name";
vb
dataSource.DefaultSorting = "Name"

Multiple columns can be separated by semicolons.

csharp
dataSource.DefaultSorting = "UnitPrice DESC; Name";
vb
dataSource.DefaultSorting = "UnitPrice DESC; Name"

Note

The DefaultSorting property must be specified before the WcfInstantFeedbackSource is bound to a data-aware control.

See Also

WcfInstantFeedbackSource Class

WcfInstantFeedbackSource Members

DevExpress.Data.WcfLinq Namespace