The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
What I want to accomplish is sorting by multiple columns. It seems that when I sort a ggc, it is only based on a specific column. That column is the column that I click the header of. I want to be able to sort based on multiple columns, one after another. Is this possible? If so, can you please provide an example?
HAhaneefm Syncfusion Team October 3, 2007 05:03 PM UTC
Hi Patrick,
By default the multi column sort by Ctrl+Left Button Mouse Click is enabled. To enable/disable the multi column sort the AllowMultiColumnSort property must be set to true/false. Below is a code.
this.gridGroupingControl1.TableOptions.AllowMultiColumnSort = false; From code to sort several columns, you add the columns the grid.TableDescriptor.SortedColumns collection.
this.gridGroupingControl1.TableDescriptor.SortedColumns.AddRange( new SortColumnDescriptor[ ] { new SortColumnDescriptor(colName1, ListSortDirection.Ascending), new SortColumnDescriptor(colName2, ListSortDirection.Descending), new SortColumnDescriptor(colName3, ListSortDirection.Ascending) });