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.

Automatically adjust header row height?

Thread ID:

Created:

Updated:

Platform:

Replies:

21040 Nov 1,2004 05:19 AM Nov 1,2004 02:17 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 1, 2004 05:19 AM

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 06:22 AM

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 02:02 PM

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 02:17 PM

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.

CONFIRMATION

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.

;