Back to Devexpress

XPInstantFeedbackSource.DefaultSorting Property

xpo-devexpress-dot-xpo-dot-xpinstantfeedbacksource-80be8023.md

latest2.3 KB
Original Source

XPInstantFeedbackSource.DefaultSorting Property

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

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public string DefaultSorting { get; set; }
vb
Public Property DefaultSorting As String

Property Value

TypeDescription
String

A String object which contains the names of the columns against which data source contents are sorted.

|

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

Assign the DefaultSorting property before binding the XPInstantFeedbackSource to the GridControl or SearchLookUpEdit. Once bound, changing this property throws an exception.

See Also

XPInstantFeedbackSource Class

XPInstantFeedbackSource Members

DevExpress.Xpo Namespace