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

Text wrapping

Thread ID:

Created:

Updated:

Platform:

Replies:

31887 Jul 18,2005 10:43 AM UTC Jul 29,2005 10:39 AM UTC WinForms 2
loading
Tags: GridControl
Mike Woolley
Asked On July 18, 2005 10:43 AM UTC

Hi, I''m using a textbox in a cell to edit data. The default behaviour is that the textbox will scroll if the user enters text that exceeds the current width. Rather than scrolling, I would like to detect when I need more space and increase the row height so that the text spans multiple lines (and conversely, decrease if text is subsequently deleted). Any ideas as to how I could do this?

Administrator [Syncfusion]
Replied On July 18, 2005 11:02 AM UTC

If you set style.TextWrap = true and style.AutoSize = true for the cell, then as you user types, the height of the cell should increase. But it will not decrease dynamically. If you want to shrink the cell as your user leaves it, then you could handle CurrentCellMoved, and there call grid.Model.Rowheights.ResizeToFit passing in a GridRangeInfo object holding the cell that you can get from grid.CurrentCell.MoverFromRowIndex/ColIndex.

Marian
Replied On July 29, 2005 10:39 AM UTC

style.TextWrap property doesn''t exist, try style.WrapText

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

;