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

Text wrapping

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?

2 Replies

AD Administrator Syncfusion Team July 18, 2005 06:02 AM

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.


MA Marian July 29, 2005 05:39 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon