C# Code for Sorting in ListView
Kettic ListView .NET Component allows the users to sorting items in ListView for C#.NET Windows Forms applications. It is possible to accomplish the items sorting functionality by using C# code or by click column header. The sorting feature can be performed in all views in ListView control. The sorting mechanism for ListView makes it easy to use the component for .NET project being deployed on other C#.NET applications.
How to Sort ListView Items in C#.NET
Kettic ListView .NET Component is capable of sorting items in C# code for ListView and by a header click. To perform the sorting items in C#, we need to add the appropriate SortDescriptor to the SortDescriptors collection of Kettic ListView control. To sort items by header click, we need to enable this functionality in clicking a column header in DetailsView. How to Enable Columns Sorting for ListView
Kettic ListView control contains two properties to enable the items sorting on header click. They are EnableSorting and EnableColumnSort, which have to be enabled by setting their values to true. The following simple C# code snippet shows how to enable the two properties.
How to add add SortDescriptor to KetticListView in C#.NET
The C# code below shows how to add SortDescriptor to Kettic ListView control in Windows Forms template projects.
| ![]() 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 ControlGet Started in C#ListView - View TypesListView - Design TimeAdd ColumnsAdd GroupsAdd ItemsListView - FeaturesItem Selection & SizingFilteringGroupingSortingListView - Data BindingPopulating with DataCheckbox & EditorCustom ItemsWinForms 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 ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |