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?
ADAdministrator 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.