ComponentOne List for WinForms
In This Topic
    Enabling Word Wrap in Cells
    In This Topic

    By default, a list 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 list's ItemHeight 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 list's row height accommodates multiple lines.

    You can use the following loop to enable word wrap for all list columns:

    To write code in Visual Basic

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

    To write code in C#

    C#
    Copy Code
    C1.Win.C1List.C1DisplayColumn C;     
    foreach (C in this.c1List1.Splits[0].DisplayColumns)
    {  
        C.Style.WrapText = true;     
    }