PivotGrid Group Sorting in C#.NET
KetticPivotGrid control contains various sorting options, which are able to sort group descriptions in rows and columns. With the sorting functionality, the users are able to sort the groups in an ascend order and a descend order according to the names of the properties or the aggregated description in Pivot. The users of this control are able to set the sorting functionality on the ColumnGroupDescriptions or RowGroupDescriptions.
Group Sorting Description in KetticPivotGrid
The default setting of RowGroupDescriptions in KetticPivotGrid is ascending according to the names of the properties. The end users of your application are able to simply change the sorting of a row field by clicking on the element. Additionally, we can apply sorting to Pivot according to the PropertyAggregateDescription. It is easy to set the sorting order of any row group description in ascending or descending. However, KetticPivotGrid control can not apply sorting the AggregateDescriptions. It is possible to sort the columns or rows according to the values aggregated. Apply Sorting to KetticPivotGrid
KetticPivotGrid control allows the users to apply the sorting both in C# code and at runtime. The following are the C# code sample that shows how to apply sorting according to different elements.
The following C# code snippet shows how to sort the header in ascending or descending order. To change the sorting order, we can use the SortOrder property.
The following C# code snippet demonstrates how to sort the GrandTotals in ascending or descending order. To change the sorting order, we need to use the SortOrder property and GroupComparer property.
Change KetticPivotGrid Sorting at Runtime
To change the sorting at runtime in C# template project, we shall use the KetticPivotFieldList of the Pivot component. When changing the sorting at runtime, we can click a Row Label field or a Column Label field, and then a popup containing various sorting options will be open. The users can modify the sorting by using the sorting options. To save the current sorting without changing the order, we can use the first two options. | ![]() 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 ControlPivotGrid - StructurePivotGrid - Property BuilderPivotGrid - Populating with DataDesign Time Data BindingUse DataSource PropertyLocal Source DataUse the AdoMDDataProviderUse XMLA Data ProviderPivotGrid - Layout SettingsPivotGrid - Format AppearancePivotGrid - Binding with ChartPivotGrid - FilteringReport FilterGroup FilterPivotGrid - SortingPivotGrid - Printing SupportPrinting styleCustomizationPivotGrid - DialogsCustomizationWinForms 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 |