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

resize the height of the header row

how do i get the grid control to resize itself to show all the text in the header? i got some long text for a header, the text wraps when the grid is resized, and the top and bottom get cut off i''d like to resize the height of the header to accommodate the text. thanks in advance!

7 Replies

AD Administrator Syncfusion Team January 19, 2004 06:52 AM UTC

Try; this.grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Row(0)), GridResizeToFitOptions.IncludeHeaders);


AD Administrator Syncfusion Team January 19, 2004 06:48 PM UTC

thanks clay but it doesn''t work ( i actually tried that line of code before posting the question ) is there any other properties setting might stop the ResizeToFit from happening?


AD Administrator Syncfusion Team January 19, 2004 08:30 PM UTC

Those calls worked for me in this sample using 2.0.2.0. Do they work for you? If not, what version are you using?


AD Administrator Syncfusion Team January 20, 2004 08:56 PM UTC

thanks for the sample, clay please open the attached screenshot and you can see how the text in the header gets cut off by the way, i notice that you used VS.net 1.0 and i had to convert the project to 1.1 to run it(but i doubt that matters) untitled_6269.zip


AD Administrator Syncfusion Team January 20, 2004 09:01 PM UTC

sorry, clay, it''s just that your code doesn''t handle the resize event, please ignore my previous post and screen shot, thank you!


AD Administrator Syncfusion Team January 20, 2004 09:50 PM UTC

clay, i''ve found a very wired problem the ResizeToFit works fine as long as you don''t have hidden columns on the grid if i add the following line of code to your sample before the ResizeToFit happens, it just stops working this.gridControl1.HideCols[3] = true; any idea why? and any work around?


AD Administrator Syncfusion Team January 20, 2004 11:17 PM UTC

I don''t see the poblem in 2020. I put your line of code as the first line in FormLoad, and the headers resize as before except the 3rd column is hidden.

Loader.
Up arrow icon