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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

resize the height of the header row

Thread ID:





9953 Jan 18,2004 10:59 PM UTC Jan 20,2004 11:17 PM UTC WinForms 7
Tags: GridControl
Asked On January 18, 2004 10:59 PM UTC

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 06:52 AM UTC

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

Administrator [Syncfusion]
Replied On 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?

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

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 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

Administrator [Syncfusion]
Replied On 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!

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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.


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

Live Chat Icon For mobile
Live Chat Icon