corelibraries-devexpress-dot-xpo-dot-sortproperty.md
Gets or sets the name of the property to sort against.
Namespace : DevExpress.Xpo
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
[Browsable(false)]
[DefaultValue("")]
public string PropertyName { get; set; }
<DefaultValue("")>
<Browsable(False)>
Public Property PropertyName As String
| Type | Default | Description |
|---|---|---|
| String | String.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.
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