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

Automatically adjust header row height?

Thread ID:





21040 Nov 1,2004 10:19 AM UTC Nov 1,2004 07:17 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On November 1, 2004 10:19 AM UTC

How, in a GridControl, do I get the grid to automatically adjust the row height''s of the header rows to accomodate the header row''s text when it wraps (or when a user shrinks or expands the column width)? Thanks, Andy

Administrator [Syncfusion]
Replied On November 1, 2004 11:22 AM UTC

You have to explicitly call grid.Model.RowHeights.ResizeToFit, passing a range object and an options object. To resize headers, you need to make sure the options have the IncludeHeaders flag turned on. grid.Model.RowHeights.ResizeToFit(someRange, GridResizeToFitOptions.IncludeHeaders);

Administrator [Syncfusion]
Replied On November 1, 2004 07:02 PM UTC

I had to put the ResizeToFit call in a couple places (after I load the data into the grid and then again inside a ColWidthsChanging handler) and then that worked. Is there no way to flag a particular row so that it is automatically resized when it''s cells'' content or width has changed? If not, can I put that in as a feature request? Thanks, Andy

Administrator [Syncfusion]
Replied On November 1, 2004 07:17 PM UTC

There is a AutoSize style property that you can set which will allow the cell to autosize as your user types into the cell. But if you programatically change the cell value, then you have to explicitly call ResizeToFit.


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