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

Resizing GridGroupingControl

Thread ID:





74038 May 28,2008 11:25 PM UTC May 30,2008 04:39 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On May 28, 2008 11:25 PM UTC


I'm using a grid grouping control and I want to resize the entire control when i expand a group.
ie. I expand a group and instead of scrollbars appearing the entire control resizes so all the rows are visible.

Can I have some advice on how to do this?

Sri Rajan [Syncfusion]
Replied On May 29, 2008 10:56 AM UTC

Hi Squish,

Thank your interest in Syncfusion products.

If your intension is to view all the rows without showing scrollbar when you expand a group, then you can achieve this by using QueryRowHeight event. QueryRowHeight event is used to set the Height of rows. Please refer the below code for more details.

void TableModel_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
e.Size = (this.gridGroupingControl1.Height / this.gridGroupingControl1.TableControl.Model.RowCount);
e.Handled = true;

Please let me know if this helps.

Best Regards,

Administrator [Syncfusion]
Replied On May 29, 2008 03:22 PM UTC

This isn't quite what I was looking for.
I want the row heights to stay the same, and the actual grid grouping control displaying the grid to get bigger.

For example
If I have a 100 pixel high grid grouping control, and the grid actually has 20, 10 pixel high rows. The grid will be 200 pixels which is smaller then the display height of the control (100 pixels) so a scroll bar will appear.
I want the control to resize to have a height of 200 pixels


Sri Rajan [Syncfusion]
Replied On May 30, 2008 04:39 AM UTC

Hi Squish,

Thank you for your interest in Syncfusion products.

You need to handle QueryCellStyleInfo event and set the height of GridGroupingControl to achieve this task. Please refer the below code snippet for more detais.

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
rowcount = this.gridGroupingControl1.TableControl.Model.RowCount;
this.gridGroupingControl1.Height = (rowheight * rowcount);

Here is the minimal sample which implements this task.

Best Regards,


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