ComponentOne True DBGrid for WinForms
Enabling Wordwrap in Cells
Customizing the Grid's Appearance > Row Height and Word Wrap > Enabling Wordwrap in Cells

By default, a grid cell displays a single line of text, truncated at the cell's right boundary. Display multiple lines of text in a cell by increasing the grid's RowHeight property and setting the WrapText property of the desired column's Style object to True. If WrapText is True (the default is False), a line break occurs before words that would otherwise be partially displayed in a cell. The cell contents will continue to display on the next line, assuming that the grid's row height accommodates multiple lines.

Use the following loop to enable wordwrap for all grid columns:

To write code in Visual Basic

Visual Basic
Copy Code
Dim C As C1.Win.C1TrueDBGrid.C1DisplayColumn
For Each C In Me.C1TrueDBGrid1.Splits(0).DisplayColumns
    C.Style.WrapText = True
Next

To write code in C#

C#
Copy Code
C1.Win.C1trueDBGrid.C1DisplayColumn C ;
for each(C in this.C1trueDBGrid1.Splits[0].DisplayColumns) 
{
    C.Style.WrapText = true ;
}
See Also