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. Image for the cookie policy date

Multiple level grouping in GGC

Hi, I have a GGC Grid that has multiple SortedColumnDescriptor in TableDescriptor.GroupedColumns. The GGC will group my DataRow (in multiple level) based on the order that I specified in the SortedColumnDescriptors. Now my question is, is that possible to combine the group headers into one group header (i.e. instead of having a tree-like hierachy, I have a 1 level group header)? Thanks.

3 Replies

AD Administrator Syncfusion Team June 13, 2006 01:11 PM UTC

Hi Kai, The Attached sample demonstrates the feature single group caption for multiple groups in the grid. It also implements the IGridRowHeight interface and its routines for getting,setting and preventing row height for child group elements(other than the first group) .Here is a code snippet. private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; if(e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption && e.TableCellIdentity.ColIndex == 0 && e.TableCellIdentity.RowIndex > 0) { if(e.TableCellIdentity.DisplayElement.ParentGroup.Name != ParentGroupName) { ((IGridRowHeight)e.TableCellIdentity.DisplayElement).RowHeight = 0; e.Handled = true; } } } Please refer to the attachment for more details. http://www.syncfusion.com/Support/user/uploads/GGCSingleGroupCaptiont_a44d7b46.zip For more details about the Resizing rows in grid, See the browser sample. syncfusion\essential studio\3.2.1.0\Windows\Grid.Windows\samples\Grouping\ResizableRows Let me know if this helps. Best Regards, Haneef


SS Suhail Shaikh November 11, 2008 10:06 AM UTC

Hi,

This does with small data, but if the data is huge and grouping is by multiple columns(like 5 column) , then it behaves very very slowly.Is there a way to achieve the same behaviour in a more efficient and performent way?

Thank you,
Developer

>Hi Kai,
>
>The Attached sample demonstrates the feature single group caption for multiple groups in the grid. It also implements the IGridRowHeight interface and its routines for getting,setting and preventing row height for child group elements(other than the first group) .Here is a code snippet.
>
>private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
>{
> GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
> if(e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption && e.TableCellIdentity.ColIndex == 0 && e.TableCellIdentity.RowIndex > 0)
> {
>
> if(e.TableCellIdentity.DisplayElement.ParentGroup.Name != ParentGroupName)
> {
> ((IGridRowHeight)e.TableCellIdentity.DisplayElement).RowHeight = 0;
> e.Handled = true;
> }
> }
>}
>
>Please refer to the attachment for more details.
>http://www.syncfusion.com/Support/user/uploads/GGCSingleGroupCaptiont_a44d7b46.zip
>
>For more details about the Resizing rows in grid, See the browser sample.
>syncfusion\essential studio\3.2.1.0\Windows\Grid.Windows\samples\Grouping\ResizableRows
>
>Let me know if this helps.
>Best Regards,
>Haneef



JJ Jisha Joy Syncfusion Team November 19, 2008 10:19 AM UTC

Hi,

It is not possible to hide individual Group captions in GridGroupingControl. But by setting TopLevelGroupOptions.ShowCaption property you can hide all group captions.

this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;

Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon