- Online Barcode Generator
- How To
- Buy Now
C# Customize Sorting Nodes of KetticTreeView
KetticTreeView WinForms control offers the support of sorting nodes and the rich C# API to manipulate the data. It is easy to perform the KetticTreeView node sorting operations on the fly when we exposed the filter event in C# Windows project. The rich C# API and complete set of filter events included in the KetticTreeView component help the users to fully control the filtering functionalities for nodes. The developers can easily add, delete, update items at runtime as well as create hierarchical navigation for nodes of KetticTreeView control.
Create Custom Sorting Nodes in KetticTreeView in C#.NET
KetticTreeView control for Windows Forms provides large flexibility for the users to create custom sorting logic to apply to the Nodes of KetticTreeView. And the KetticTreeView control provides higher priority than the sorting by default. The custom sorting logic can be applied to nodes through creating a C# class to inherit the TreeNodeComparer and override the Compare method.
In the C# code sample below, we will create a custom comparer and reverse the sorting order of KetticTreeView. It will sort in ascending order as we sort the Nodes of KetticTreeView.
After we create the custom comparer, we can add it to the KetticTreeView in C#.NET project by using the C# code below
And then we can run the application to check if we can reverse the sorting order. This is achieved by adding a button and a label to the Windows Forms to customize and print the node sorting order. The following C# code snippet demonstrates the customization of testing sorting nodes of KetticTreeView.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls