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.

Expanding/Collapsing all child groups.

Thread ID:

Created:

Updated:

Platform:

Replies:

57816 Mar 12,2007 10:44 AM Mar 12,2007 11:10 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 12, 2007 10:44 AM

Hi,

I am using GridGroupingControl.

1) On menu option click I want to Expand/Collapse all the groups, how it can be done?

2) Suppose I have 3 tab pages. On each tab page I have placed one GGC. All three grids have same datasource, but show different columns.
If I expand one child group in tabpage1, the same group in remaining 2 tabpages should get expanded. How it can be done.

Pls reply asap.

Thanks,
Vinod

Administrator [Syncfusion]
Replied On March 12, 2007 11:10 AM

Hi Vinod,

Question 1) On menu option click I want to Expand/Collapse all the groups, how it can be done?
>>>>>
You can call the Table.ExpandAllGroups method to expand the Top-level group and nested groups in a Grid and use the CollapseAllGroups method for collapsing the Top-Level group and all nested level groups in a Grid.

GGC.Table.ExpandAllGroups(); //
GGC.Table.CollapseAllGroups();

>>>>>
Question 2)Suppose I have 3 tab pages. On each tab page I have placed one GGC. All three grids have same datasource, but show different columns.
If I expand one child group in tabpage1, the same group in remaining 2 tabpages should get expanded. How it can be done.
>>>>>
You can copy the settings from one Engine object to another and also have different engine object point to the same datasource of the GridGrouping Control to achieve your shared behaviour. please try this code in SelectedIndexChanged EventHandler

TabPageAdv adv = this.tabControlAdv1.SelectedTab;
GridGroupingControl GGC = (GridGroupingControl)adv.Controls[0];
GGC.Focus();
GGC.TableModel.Model.Selections.Clear();
GGC.Engine.InitializeFrom(engine);
foreach(GridRangeInfo info in list)
GGC.TableModel.Model.Selections.Add(info);
if(RowIndex != -1 && ColIndex != -1)
GGC.TableControl.CurrentCell.MoveTo( RowIndex,ColIndex,GridSetCurrentCellOptions.ScrollInView);
GGC.TableControl.Table.CurrentRecord.SetCurrent();

Sample : http://websamples.syncfusion.com/samples/Grid.Windows/TabAdvGGCwithshareData/main.htm
>>>>>

Best regards,
Haneef

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.

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.

;