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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Working with collapsed/Expanded Groups

Thread ID:

Created:

Updated:

Platform:

Replies:

59854 Apr 23,2007 10:14 PM UTC Apr 24,2007 06:26 PM UTC WinForms 1
loading
Tags: Grouping
Navaneeth Rajkumar
Asked On April 23, 2007 10:14 PM UTC

Hi,
I have a GGC which has records that are grouped by some Column.. Among the different groups, a few groups are collapsed and a few are expanded..
1. How do I get the list of Groups? Collapsed and Expanded?
2. How can I collapse or Expand a particular group?

haneefm [Syncfusion]
Replied On April 24, 2007 06:26 PM UTC

Hi Raj,

1. How do I get the list of Groups? Collapsed and Expanded?
>>>>>

Here is a code snippet that shows you "How to access all the groups and the records categorized under it?".

this.iterate(this.gridGroupingControl1.Table.TopLevelGroup);

public void iterate(Group g)
{
System.Diagnostics.Trace.WriteLine("GroupLevel = "+g.GroupLevel);
System.Diagnostics.Trace.WriteLine(g.Info);
foreach(Record r in g.Records)
{
System.Diagnostics.Trace.WriteLine(r.Info);
}
foreach(Group gr in g.Groups)
{
iterate(gr);
}
}

2. How can I collapse or Expand a particular group?
>>>>>

Use the IsExpanded property to expand/collapse the group in grid. Here is a code snippet to expand the toplevel group in a grid.

this.gridGroupingControl1.Table.TopLevelGroup.IsExpanded = true;
this.gridGroupingControl1.Table.TopLevelGroup.IsExpanded = false;

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;