ComponentOne True DBGrid Pro 8
Enabling wordwrap in cells

By default, a grid cell displays a single line of text, truncated at the cell's right boundary. You can display multiple lines of text in a cell by increasing the grid's RowHeight property and setting the WrapText property of the desired columns 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.

You can use the following loop to enable wordwrap for all grid columns:

Example Title
Copy Code
Dim C As TrueDBGrid80.Column

For Each C In TDBGrid1.Columns

    C.WrapText = True

Next

Or, at design time, you can set WrapText to True in one column, then use the Set All Columns command on the property tree context menu to apply that value to all columns.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback