Back to Devexpress

SortProperty.PropertyName Property

corelibraries-devexpress-dot-xpo-dot-sortproperty.md

latest2.3 KB
Original Source

SortProperty.PropertyName Property

Gets or sets the name of the property to sort against.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

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

Property Value

TypeDefaultDescription
StringString.Empty

A String value which specifies the name of the property that identifies the sorted column in a data store. This value is case-sensitive.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PropertyName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF_Non-Persistent-Objects-Filtering-Demo/CS/EFCore/NonPersistentFilteringEF.Module/BusinessObjects/Contact.cs#L97

csharp
if(sorting != null && sorting.Count == 1 && sorting[0].Property is OperandProperty) {
    sort = string.Format("{0} {1}", sorting[0].PropertyName, sorting[0].Direction == DevExpress.Xpo.DB.SortingDirection.Ascending ? "ASC" : "DESC");
}

See Also

SortProperty Class

SortProperty Members

DevExpress.Xpo Namespace