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

gridGroupingControl question

I am new to gridGroupingControl. I have a data table which binds to my gridGroupingControl. My table has 3 rows that are named "Computers", "Results" and "Run Action". My purpose is very simple, just group the "Computers" column and display the plus/minus sign so that the rows that have same computer name can be grouped and expanded. Somehow I could not display the plus/minus sign. Can you tell me what shall I do? Is there any tutorials for the gridGroupingControl starters? My code is as follows: this.gridGroupingControl1.DataSource = resultTable; gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Computers"); gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Computers"); gridGroupingControl1.TopLevelGroupOptions.ShowCaptionPlusMinus = true; gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false; gridGroupingControl1.TopLevelGroupOptions.ShowColumnHeaders = true; gridGroupingControl1.TopLevelGroupOptions.ShowSummaries = true; gridGroupingControl1.ChildGroupOptions.ShowCaptionPlusMinus = true; gridGroupingControl1.ChildGroupOptions.ShowCaption = false; gridGroupingControl1.ChildGroupOptions.ShowColumnHeaders = false; gridGroupingControl1.ChildGroupOptions.ShowSummaries = true;

4 Replies

AD Administrator Syncfusion Team June 2, 2005 07:06 PM

I think the main problem with teh code you showed are the 2 lines that have ShowCaption = false; This is hiding teh caption row, and this necessarily hides teh plus/minus that is part of teh caption row. The default settings will give most of what you described, so I think you can get what you wanted just setting these properties. gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Computers"); gridGroupingControl1.TableDescriptor.AllowNew = false; //this.gridGroupingControl1.Table.ExpandAllGroups();


ME Mechelle June 3, 2005 11:43 AM

Thanks for the reply. I did what you said. But only the top +/- sign is displayed, not the subgroup''s. I am attaching the screen shot, hopefully you understand what I am talking about. Ggd_6253.zip


AD Administrator Syncfusion Team June 3, 2005 12:07 PM

Did you remove the code where you were setting the ChildGroupOptions? In the code you originally listed, only have top datasource setting line, and the 2 lines I showed above.


ME Mechelle June 3, 2005 03:10 PM

No, I didn''t remove the part of code about ChildGroupOptions. Actrually in the form design view, I changed gridGroupingControl1 to default setting. And following is mt code: gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Computers"); gridGroupingControl1.TableDescriptor.AllowNew = false; gridGroupingControl1.TopLevelGroupOptions.ShowCaptionPlusMinus = true; gridGroupingControl1.TopLevelGroupOptions.CaptionText = ""; gridGroupingControl1.TopLevelGroupOptions.ShowCaption = true; gridGroupingControl1.TopLevelGroupOptions.ShowColumnHeaders = true; gridGroupingControl1.ChildGroupOptions.ShowCaptionPlusMinus = true; gridGroupingControl1.ChildGroupOptions.CaptionText = ""; gridGroupingControl1.ChildGroupOptions.ShowCaption = true; gridGroupingControl1.ChildGroupOptions.ShowColumnHeaders = false;

Loader.
Live Chat Icon For mobile
Up arrow icon