Expand Nodes in child table after grid grouping control refreash

Hi,
I have databound Grid Grouping Control with one simple parent-child relationships.End users would be expanding child nodes and make some changes.Thereafter when users click on save button i would be saving changes to database and then refreasg Grid Grouping Control.What i want is that in whichever child nodes user has made changes should get expanded after i refreash GGC(so that users can see changes they have made without clicking on plu-minus sign).Any samples/insights on this would be higly appreciated.
Thanks in advance for replying(as always)

With Warm Regards,
Manish Bafna.

2 Replies

AD Administrator Syncfusion Team March 6, 2007 11:41 PM UTC

Hi Manish,

You can use the following code to expand and collapse the grid table records.

To expand the CurrentRecord : this.gridGroupingControl1.Table.CurrentRecord. IsExpanded = true;
To expand a selected record : this.gridGroupingControl1.Table.SelectedRecords[0].Record.IsExpanded = true;
To expand the specific Record : this.gridGroupingControl1.Table.Records[ index ].IsExpanded = true;

To expand all the records in a table
this.gridGroupingControl1.Table.ExpandAllRecords();

To Collapse all the records in a grid.
this.gridGroupingControl1.Table.CollapseAllRecords();

Best regards,
Haneef


MB Manish Bafna March 7, 2007 10:27 AM UTC

Hi,
I dont know whether i would be able to expalin properly but i am trying my best.
I have databound Heirchical Grid Grouping Control with two heirchical levels(0-parent,1-child).What i want to do is plus/minus of parent table should get expaned(when i reload the GGC after the user clicks save button) for rows of child table in which user has made changes.For this i am palnning to use tablecontrolcellchanged event of child table but i am not able to get rowindex of corresponding parent row of parent table.Once i am able to get rowindex of corresponding parent row of parent table i will store rowindex in an arraylist.Thereafter i will use youe isexpanded syntax(i use rowindexes from this arraylist to expand only those rows of parent table for which some changes has been in their child rows)

Any insights/ideas on this would be highly appreciated.

With Warm Regards,
Manish Bafna.

>Hi Manish,

You can use the following code to expand and collapse the grid table records.

To expand the CurrentRecord : this.gridGroupingControl1.Table.CurrentRecord. IsExpanded = true;
To expand a selected record : this.gridGroupingControl1.Table.SelectedRecords[0].Record.IsExpanded = true;
To expand the specific Record : this.gridGroupingControl1.Table.Records[ index ].IsExpanded = true;

To expand all the records in a table
this.gridGroupingControl1.Table.ExpandAllRecords();

To Collapse all the records in a grid.
this.gridGroupingControl1.Table.CollapseAllRecords();

Best regards,
Haneef

Loader.
Up arrow icon