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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamically change ggc height depending on visible rows

Thread ID:

Created:

Updated:

Platform:

Replies:

73378 May 5,2008 10:13 AM UTC May 13,2008 09:14 PM UTC Windows Forms 2
loading
Tags: Grouping
Karsten Brocksieper
Asked On May 5, 2008 10:13 AM UTC

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


SubhaSheela R [Syncfusion]
Replied On 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




Karsten Brocksieper
Replied On 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






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.

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

;