gridGroupingControl1.Table.ExpandAllGroups() not working

I have a flat datasource that is bound to a ggc and grouped by one column.

When I called....
this.gridGroupingControl1.Table.CollapseAllRecords();

...the grid collaspes fine but then I called...

this.gridGroupingControl1.Table.ExpandAllGroups()

...nothing happens.

3 Replies

AD Administrator Syncfusion Team January 23, 2007 07:03 PM UTC

Hi James,

Thanks for being patience.

You can collapse and expand groups by using the following code snippet.
>>>>>>>> Code Snippet 1<<<<<<<<<<
// Expand the groups
this.gridGroupingControl1.Table.ExpandAllGroups();

// Collapse the groups
this.gridGroupingControl1.Table.CollapseAllGroups();
>>>>>>>>>>>>>>><<<<<<<<<<<<<

>>>>>>>> Code Snippet 2<<<<<<<<<<
// Expand the records
this.gridGroupingControl1.Table.ExpandAllRecords();
// Collapse the records
this.gridGroupingControl1.Table.CollapseAllRecords();
>>>>>>>>>>>>>>><<<<<<<<<<<<<

In your code snippet, we could see the CollapseAllRecords being used intead of CollapseAllGroups. Please re-check it and let us know if you need any further assistance.

Have a nice day.

Best regards,
Madhan


JB James Blibo January 23, 2007 11:31 PM UTC

Did see the mistake... Anyway.. I change the code and it is still not working.
Only collaspe works, expands never works.

Here's my code snippet

bool chk = chkExpandCollaspeLineGroup.Checked;

if (chk)
{
this.gridGroupingControl1.Table.CollapseAllGroups();
log.Error("CollapseAllGroups=" + chk);
}
else
{
this.gridGroupingControl1.Table.ExpandAllGroups();
log.Error("ExpandAllGroups=" + chk);
}

I need to mention that I am using a Custom ENgine with this grid, so I am not sure if that's causing the problem...


AD Administrator Syncfusion Team January 24, 2007 11:05 AM UTC

Hi James,

Thank you for being patience.

Please refer to the following demo sample which demonstrates expand and collapse of the groups in the GridGroupingControl without any issues for a custom engine. Is it possible for you to update us the modified sample to reproduce the issue here, it would help us to debug your issue at the earliest.
GGC_ExtraSection.zip

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,
Madhan

Loader.
Up arrow icon