We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

can't get grouping to work

i created my columns through code and i am setting up one of the columns to be a grouped column

but when i run the program it does not group the data even though the column is in the grouping panel

can someone please help with this
this.gridGroupingControl1.GetTableDescriptor("Werker Transaksies").SummaryRows.Add(gridSummaryRow);
            this.gridGroupingControl1.ShowGroupDropArea = true;
            this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Tag ID");
            this.gridGroupingControl1.TableDescriptor.GroupedColumns[0].SortDirection = ListSortDirection.Ascending;
            this.gridGroupingControl1.GridGroupDropArea.AllowRemove = true;
here is the code for the grouping part

3 Replies

AK Adhikesevan Kothandaraman Syncfusion Team August 5, 2015 10:31 AM UTC

HI Pierre,
 
Thank you for your interest in our Syncfusion products.
 
The Grouping is done by using the “MappingName”. It seems like your using the “Header Text” to add the GroupedColumns. Use the “MappingName” (which is the name of the column at the data table) for Grouping instead of HeaderText.
 
For example:
Assume that the column name is like “Roll_No” in the data table. You can set the column header text of the column by using  grid.TableDescriptor.Columns[“Roll_No”].HeaderText as “Serial No”.
The Column will display with the HeaderText(“Serial No”) while it loaded. If you want to add this column into the GroupedColumns collection you need to use the MappingName not the HeaderText.
 
C#:
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add(“Roll_No”); //don’t use the (“Serial No”).
 
Please let us know if you need any further assistance.
 
Regards,
Adhi.



PS Pierre Smith August 5, 2015 12:26 PM UTC

Thank you Adhi

I changed it to use the mapping name and it is working like a charm now. Knew I did something wrong just overlooked that

Thank you
Pierre


AK Adhikesevan Kothandaraman Syncfusion Team August 6, 2015 09:07 AM UTC

Hi Pierre,
Thank you for your update.
We are glad to hear from you that your reported scenario has been achieved.  
Please let us know if you need any further assistance. 
Regards,
Adhi.
 

Loader.
Live Chat Icon For mobile
Up arrow icon