Xuni Controls > FlexGrid > Features > Word Wrapping |
FlexGrid's WordWrap property allows a user to display multi-line text in a single cell of the grid. To enable word wrapping in a FlexGrid column, set the value of WordWrap property to True. By default, its value is set to False. The WordWrap property determines whether the grid should automatically break long strings containing multiple words and special characters such as spaces in multiple lines. Multiple line text can be displayed in both fixed and scrollable cells.
C# |
Copy Code |
---|---|
//to enable word wrap grid.Columns[1].WordWrap = true; |
To resize the row heights automatically, you can then call the AutoResizeRow and AutoResizeRows methods as illustrated in the code below.
C# |
Copy Code |
---|---|
// resize a single row grid.AutoSizeRow(1); // resize all rows grid.AutoSizeRows(0, grid.Rows.Count – 1); |