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

GridListControl - Unpredictable Row Header Height

Thread ID:





30972 Jun 28,2005 02:30 PM UTC Jul 4,2005 06:05 AM UTC WinForms 5
Tags: GridControl
Kai Iske
Asked On June 28, 2005 02:30 PM UTC

Hi, I have a couple of GridListControl objects on forms. All GridListControls are initialized using DataBinding. What is strange is the way the controls determine the row header height. Some are fine, others have a row header heigth twice the height of normal data rows. Is there any way I can prevent this? Is there anything I could look for in my code in order to prevent this? BTW: All controls are hosted within TabControlAdv controls. The tab controls have anchors left, right, top, bottom. So do the contained GridListControl instances. Any help would be appreciated Regards Kai Iske

Administrator [Syncfusion]
Replied On June 28, 2005 03:15 PM UTC

You should be able to explicitly set the title row height with code like: this.gridListControl1.Grid.RowHeights[0] = 50; You can try using resize to fit to set the heights as well. this.gridListControl1.Grid.RowHeights.ResizeToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.IncludeHeaders); What might be going on is that the gridlistcontrol is being parented before its parent is finally situated, and all this is being done while both the gridlistcontrol and its parent are not visible.

Kai Iske
Replied On June 29, 2005 06:05 AM UTC

Clay, thanks for the hint. However what I haven''t mentioned is that I assign a custom ITypedList to the DataSource of the GridListControls. The list in turn returns names of properties including spaces. What I believe is happening is that the grid attempts to WordWrap the header row cell texts and thus enlarges the row height. When I manually set the row height or force it to autofit it doesn''t do anything. BTW: Speaking about the ITypedList and custom names: The grid uses the PropertyDescriptor.Name property for the row header''s cell text. Wouldn''t it be better to use PropertyDescriptor.DisplayName? Maybe something worthwhile considering for the next release. Thanks Kai

Kai Iske
Replied On June 29, 2005 06:06 AM UTC

Clay, as an addition: I have now changed my custom property names to no longer include spaces: It works fine now. However I would prefer using the "spaced" property names. If there is any way you could think of fixing this issue, please let me know. Thanks in advance Regards Kai

Administrator [Syncfusion]
Replied On June 29, 2005 07:27 AM UTC

You might try setting: this.gridListControl1.Grid.BaseStylesMap["Column Header"].StyleInfo.WrapText = false; to see if this will allow you to have spaces in your names without causing the text to wrap.

Kai Iske
Replied On July 4, 2005 06:05 AM UTC

Good point. Didn''t think about "patching" the base style. Thanks Kai


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