Skip to main content
A newer version of this page is available. .

TreeListCustomNodeSortEventArgs.Result Property

Gets or sets the result of a custom comparison.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public int Result { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the result.

Remarks

Use the Result property to set the result of the custom comparison. The processed nodes are specified by the TreeListCustomNodeSortEventArgs.Node1 and TreeListCustomNodeSortEventArgs.Node2 properties.

When handling the ASPxTreeList.CustomNodeSort event, the Result property must be set as follows:

  • set Result to -1 if the first node should be positioned above the second node when data is sorted in ascending order. When data is sorted in descending order, the first node will be positioned below the second row.
  • set Result to 1 if the first node should be positioned below the second node when data is sorted in ascending order. When data is sorted in descending order, the first node will be positioned above the second row.
  • set Result to 0 to indicate that the nodes are equal. In this case, the nodes will be arranged within the tree list according to their indexes in a data source.
See Also