Skip to content

Commit 26c55af

Browse files
Added changes in content for sorting
1 parent 2237724 commit 26c55af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MAUI/TreeView/sorting.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ documentation: ug
1111

1212
The `SfTreeView` control provides built-in support for sorting data using the `SortDescriptors` property. Items can be sorted in either ascending or descending order. Custom sorting logic is also supported to sort the items.
1313

14+
N> When the new collection is updated to the `ItemsSource`, the `SortDescriptors` should be cleared and reinitialized manually based on the requirements for sorting.
15+
1416
## Programmatic sorting
1517

1618
Sort items by creating a `SortDescriptor` with the property name and sort direction, and then adding it to the `SortDescriptors` collection.
@@ -106,7 +108,7 @@ public class CustomDateSortComparer : IComparer<object>
106108

107109
## Clear sorting
108110

109-
When the `SortDescriptors` collection is cleared, it restores the default order of the node collection, and the TreeView reverts to its original order.
111+
When the `SortDescriptors` collection is cleared, the TreeView control restores the original order of its node collection. This means the nodes will appear in the default sequence as defined in the underlying data source, effectively removing any applied sorting.
110112

111113
{% tabs %}
112114
{% highlight c# %}

0 commit comments

Comments
 (0)