AD
Administrator
Syncfusion Team
March 12, 2007 03:10 PM UTC
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