\
ComponentOne List for WinForms
Design-Time Support / Using the ValueItem Collection Editor
In This Topic
    Using the ValueItem Collection Editor
    In This Topic

    The ValueItemCollection is a collection of values and display values which allows for translated data within a column. This collection object can be accessed through the C1DataColumn.ValueItems.Values property. Accessing these properties in code is done through this collection, and is demonstrated by the following:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.Columns(0).ValueItems.Values
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.Columns[0].ValueItems.Values;
    

    In order to make these properties more easily modifiable, there is a ValueItem Collection Editor which enables the user to add ValueItems, remove ValueItems, and alter their Value and DisplayValue properties. This editor is accessible through the Properties window. Click the ellipsis button next to the Columns property in the Properties window to bring up the C1List Designer. Expand the ValueItems node to expose the ValueItems collection items. Click the ellipsis button next to the Values property to bring up the ValueItem Collection Editor.