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

How can I retrieve Groups in GridGroupingControl

Thread ID:





97821 Jan 11,2011 08:29 PM UTC Jan 19,2011 12:53 PM UTC General Discussion 1
Tags: General Discussion
Asked On January 11, 2011 08:29 PM UTC

Is it possible to iterate through GridGroupingControl's groups? How can I get group count


Yuvaraja V [Syncfusion]
Replied On January 19, 2011 12:53 PM UTC

Hi Lalitha,

Thanks for your interest in Syncfusion Products.

1.To get the groups count, You could make use of the property "Groups.Count".The following code illustrates the same.

void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex,e.Inner.ColIndex);
if (style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell)
Group g = style.TableCellIdentity.DisplayElement.ParentGroup;

2.Yes, Its possible to iterate through GridGroupingControl groups, You could make use of the property "Table.Elements and Table.NestedElements" to retrieve the records in Tables.

Here is the sample for your reference.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=New Folder (81)-1920022134.zip

For more information about the "Iterate Through Elements" in Table.Please refer the "Iterate Through Elements Demo" sample shipped via the Essential studio for the implementation.The path for the sample is as follows.

{Installed Drive}:\Syncfusion\Version\Windows\Grid.Grouping.Windows\Samples\2.0\Grouping Architecture\Iterate Through Elements Demo\CS

Please let us know if this helps.

Yuvaraja V.


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

This page will automatically be redirected to the 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