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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ResizeToFit problem

Thread ID:

Created:

Updated:

Platform:

Replies:

5188 Jun 24,2003 12:06 PM UTC Jun 24,2003 12:48 PM UTC WinForms 1
loading
Tags: GridControl
Michael Mann
Asked On June 24, 2003 12:06 PM UTC

Hi, I have a problem resizing header cells in a grid. I am using the new version 1.6.1.0 and I realized that the method ResizeToFit(xxx) now is working. But here's what's happening or better what's not happening: I want the following: I have a grid with a header row and in each cell there's a text oriented by 90 degrees. Because of the length of the text I want it to be wrapped in the cells and after that the row width should be resized to fit the contents (the wrapped text!). I played around a lot with the following, but nothing worked fine (ResizeToFit, WrapText, Trimming, AutoSize). I realized that the ResizeToFit method ignores the wrapText property and the autosize property doesn't affect anything. Is there a way to get it done - to auto resize wrapped cell content? Any help I appreciate Michael

Administrator [Syncfusion]
Replied On June 24, 2003 12:48 PM UTC

It is not perfect, but if you insert \r\n (ie. Environment.NewLine) to hard break your text where you want the breaks, then calling this.gridControl1.RowHeights.ResizeToFit(...) this.gridControl1.ColWidths.ResizeToFit(...) back to back will size both the row height and colwidth to fit the text with the hard breaks.

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.

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

;