Back to Devexpress

SortArgs.FieldName Property

corelibraries-devexpress-dot-mvvm-dot-xpf-dot-sortargs-44bd30a3.md

latest3.2 KB
Original Source

SortArgs.FieldName Property

Gets the field name whose values are compared.

Namespace : DevExpress.Mvvm.Xpf

Assembly : DevExpress.Mvvm.v25.2.dll

NuGet Packages : DevExpress.Mvvm, DevExpress.Win.Navigation

Declaration

csharp
public string FieldName { get; }
vb
Public ReadOnly Property FieldName As String

Property Value

TypeDescription
String

The field name whose values are compared.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the FieldName 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.

wpf-data-grid-implement-custom-grouping/CS/CustomGrouping_MVVM/MainViewModel.cs#L35

csharp
public void CustomColumnGroup(RowSortArgs args) {
    if(args.FieldName != "UnitPrice")
        return;

wpf-data-grid-implement-custom-sorting/CS/CustomSorting_MVVM/MainViewModel.cs#L34

csharp
public void CustomColumnSort(RowSortArgs args) {
    if(args.FieldName == "Day") {
        int dayIndex1 = GetDayIndex(args.FirstValue);

wpf-data-grid-implement-custom-grouping/VB/CustomGrouping_MVVM/MainViewModel.vb#L44

vb
Public Sub CustomColumnGroup(ByVal args As RowSortArgs)
    If Not Equals(args.FieldName, "UnitPrice") Then Return
    Dim x As Double = Math.Floor(Convert.ToDouble(args.FirstValue) / 10)

wpf-data-grid-implement-custom-sorting/VB/CustomSorting_MVVM/MainViewModel.vb#L42

vb
Public Sub CustomColumnSort(ByVal args As DevExpress.Mvvm.Xpf.RowSortArgs)
    If Equals(args.FieldName, "Day") Then
        Dim dayIndex1 As Integer = Me.GetDayIndex(args.FirstValue)

See Also

SortArgs Class

SortArgs Members

DevExpress.Mvvm.Xpf Namespace