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
close icon

Dynamically change ggc height depending on visible rows

Hello,

I have a ggc with one nested child table and I would like to dynamically change the height of the whole ggc depending on 'expanded' or 'collapsed' state of the second level in my ggc.
I know that I can use the events 'ggc_RecordCollapsing' and 'ggc_RecordExpanding' to count the records in the nested table but I don´t see how many records are collapsed or expanded overall in the ggc.
Is there a better way to set the overall ggc height depending on the 'visible' rows regardless of the 'expanded' or 'collapsed' state of various records.

Thank you very much for any help

Regards, Karsten


2 Replies

SR SubhaSheela R Syncfusion Team May 7, 2008 04:07 AM UTC

Hi Karsten,

Thanks for your interest in Syncfusion products.

You can set the height of the GridGrouping Control by calling the ResizeToFit method of the TableModel . Below is the code snippet:


this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Table());

Here is the sample:

'>http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCHeight_F73378/main.htm">
http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCHeight_F73378/main.htm

Please have a look into the above sample and let me know with more details if I am misunderstand anything.

Regards,
Subhasheela R





KB Karsten Brocksieper May 13, 2008 09:14 PM UTC

Hi Subhasheela,

... sorry for the delay in getting back to you. I have tried your sample and it is exactly that what I was searching for ...

Thank you very much for your efforts.

Karsten

>Hi Karsten,

Thanks for your interest in Syncfusion products.

You can set the height of the GridGrouping Control by calling the ResizeToFit method of the TableModel . Below is the code snippet:


this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Table());

Here is the sample:

'>http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCHeight_F73378/main.htm">
http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCHeight_F73378/main.htm

Please have a look into the above sample and let me know with more details if I am misunderstand anything.

Regards,
Subhasheela R






Loader.
Live Chat Icon For mobile
Up arrow icon