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 DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlKeyboard SupportDesign Time SupportBuild PropertyContext MenuTreeView - NodeAdd & Remove NodesReorder NodesFormat NodesEdit NodesSelect NodesFilter NodesCustom Filter NodesSort NodesCustom Sort NodesFind Sort NodesData BindingBasicsDatabaseXML DataDrag and DropCustomizationContext MenuCustomizationAssign ScreenTipLocalizationWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |