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 to change the height of a row in the GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: February 9, 2015 |
Last Revised Date: February 12, 2016

In the GridGroupingControl, when you change the height of a particular row, it affects the height of all the rows. You need a custom engine to resolve this problem. The custom engine is used to avoid the problem by passing the row index in the RowHeight property. In the GridModel, height of a single row is changed by using the GridEngineFactory class before invoking the InitializeComponent method.


By using GridModel



In the QueryRowHeight event, there is no engine needed to set the height of a single row because by default it supports the height change of a particular row.


By using QueryRowheight



After applying the properties, the row looks like the following screenshot

Figure 1: Changing the row height

Sample Links

C#: Changing the row height

VB: Changing the row height

You must log in to leave a comment
Sergei Leschinksy
Apr 19, 2015
When color editors (and presumably other editors are in place) the second approach will result in heavy drawing glitches when grid rows are scrolled fast. This can be be reproduced with the code below. The first approach works fine in such scenario. public Form1() { InitializeComponent(); gridGroupingControl1.DataSource = GetDataSource().Select(item => new { Color = item }).ToList(); ; gridGroupingControl1.TableModel.QueryRowHeight += TableModel_QueryRowHeight; } void TableModel_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e) { if (e.Index%2 == 0) { e.Size = 35; e.Handled = true; } } private IEnumerable GetDataSource() { var arr = Enum.GetValues(typeof (KnownColor)); return from KnownColor item in arr select Color.FromKnownColor(item); } Reply
Venkatesh Sundaram [Syncfusion]
Apr 21, 2015
Hi Sergei, We regret the inconvenience caused. Thanks for pointing this out. The “drawing glitches raised when grid rows are scrolled fast” can be resolved by using the UseDefaultsForFasterDrawing property. Please refer to the following code snippet. CodeSnippet[C#]: this.gridGroupingControl1.UseDefaultsForFasterDrawing = true; The KB article is modified now with the needed information. Please let us know if you have any other concern. Thanks and Regards, Venkat Reply

Please sign in to access our KB

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