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.

GridListControl - Unpredictable Row Header Height

Thread ID:

Created:

Updated:

Platform:

Replies:

30972 Jun 28,2005 10:30 AM Jul 4,2005 02:05 AM Windows Forms 5
loading
Tags: GridControl
Kai Iske
Asked On June 28, 2005 10:30 AM

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 11:15 AM

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 02:05 AM

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 02:06 AM

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 03:27 AM

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 02:05 AM

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

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.

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.

;