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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

gridGroupingControl question

Thread ID:

Created:

Updated:

Platform:

Replies:

29796 Jun 2,2005 08:38 PM UTC Jun 3,2005 08:10 PM UTC Windows Forms 4
loading
Tags: GridControl
Mechelle
Asked On June 2, 2005 08:38 PM UTC

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;

Administrator [Syncfusion]
Replied On June 3, 2005 12:06 AM UTC

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();

Mechelle
Replied On June 3, 2005 04:43 PM UTC

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

Administrator [Syncfusion]
Replied On June 3, 2005 05:07 PM UTC

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.

Mechelle
Replied On June 3, 2005 08:10 PM UTC

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;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;