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. Image for the cookie policy date

GridListControl - Unpredictable Row Header Height

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

5 Replies

AD Administrator Syncfusion Team 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.


KI Kai Iske 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


KI Kai Iske 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


AD Administrator Syncfusion Team 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.


KI Kai Iske July 4, 2005 06:05 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon