ComponentOne True DBGrid for WinForms
Object Model / ValueItems Class / ValueItemCollection Class
In This Topic
    ValueItemCollection Class
    In This Topic

    Each C1DataColumn object within a C1TrueDBGrid or C1TrueDBDropDown control stores its set of display value/value pairs in objects called ValueItem objects. The ValueItemCollection object is a collection of these pairs. This collection can be accessed through the Values property of the ValueItems object. For instance, in order to alter the first ValueItem in the collection, the code would look like:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1TrueDBGrid.Columns(0).ValueItems.Values(0).DisplayValue = "Canada"
    

    To write code in C#

    C#
    Copy Code
    this.c1TrueDBGrid.Columns[0].ValueItems.Values[0].DisplayValue = "Canada";
    
    See Also