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.
Hi I have implemented ICompare for the sorting on the column in the GGC.
I am using the sentence as this.dgAttributeAnalysis.TableModel.Data.SortByColumn(a, ListSortDirection.Descending, new CustomComparer());
But This is not calling Compare method in my CustomCompare class....Only constructor is execure on new CustomComparer() but Actual method is not getting executed.
ADAdministrator Syncfusion Team April 11, 2007 02:34 PM UTC
Data.SortByColumn is a GridControlBase method that is only available in a GridControl that holds its own data in the Data object. It does not work in GridGroupingControl.
To sort a column in a GridGroupingControl, you create a SortColumnDescriptor and add it to the SortedColumns collection. SortColumnDescriptor scd = new SortColumnDescriptor("Col1", ListSortDirection.Ascending); scd.Comparer = new MyComparer(); gridGroupingControl1.TableDescriptor.SortedColumns.Add(scd);
HAHarshadApril 11, 2007 03:20 PM UTC
Hi,
I have used SortColumnDescriptor as suggested. But I am getting the 0 value always in compare method...not getting the cell value... GridStyleInfoStore style1 = x as GridStyleInfoStore; GridStyleInfoStore style2 = y as GridStyleInfoStore; X & y Always coming as 0
Please tell me where i am doing wrong
HAhaneefm Syncfusion Team April 11, 2007 04:04 PM UTC
Hi Harshad,
Here is a forum thread with a sample of a custom sort.