ComponentOne List for WinForms
In This Topic
    Hiding or Displaying a Column
    In This Topic

    To hide a column on a C1List control, set the Visible property for the column to False either in the C1DisplayColumn Collection Editor or in code. To make a column visible, set the Visible property to True.

    In the Designer

    1. Open the Split Collection Editor in the Properties window by clicking the ellipsis button after the Splits property.
    2. In the Split Collection Editor, click the ellipsis button next to the DisplayColumns property to open the C1DisplayColumn Collection Editor.
    3. In the C1DisplayColumn Collection Editor, set the Visible property to False for the column that you would like hidden.

    In Code

    Add the following code to the Form_Load event:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.Splits(0).DisplayColumns.Item("UserCode").Visible = False
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.Splits[0].DisplayColumns["UserCode"].Visible = false;
    

    This topic illustrates the following:

    The final result will look like this, where the UserCode column is hidden.