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;
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
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();
ME
Mechelle
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
AD
Administrator
Syncfusion Team
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.
ME
Mechelle
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;
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
ME Mechelle
- Jun 2, 2005 08:38 PM UTC
- Jun 3, 2005 08:10 PM UTC