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.

resize the height of the header row

Thread ID:





9953 Jan 18,2004 05:59 PM Jan 20,2004 06:17 PM Windows Forms 7
Tags: GridControl
Asked On January 18, 2004 05:59 PM

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!

Administrator [Syncfusion]
Replied On January 19, 2004 01:52 AM

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

Administrator [Syncfusion]
Replied On January 19, 2004 01:48 PM

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?

Administrator [Syncfusion]
Replied On January 19, 2004 03:30 PM

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

Administrator [Syncfusion]
Replied On January 20, 2004 03:56 PM

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

Administrator [Syncfusion]
Replied On January 20, 2004 04:01 PM

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

Administrator [Syncfusion]
Replied On January 20, 2004 04:50 PM

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?

Administrator [Syncfusion]
Replied On January 20, 2004 06:17 PM

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.


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.