ComponentOne List for WinForms
In This Topic
    Inserting a Row in a Specific Location
    In This Topic

    The InsertItem method allows you to insert a row at a specific index in the list.

    To insert an item using the InsertItem method, add the following code. In this example, the text from AddRowBox will be inserted in the position entered into PostitionBox when the InsertItem button is clicked.

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.InsertItem(AddRowBox.Text, PositionBox.Text)
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.InsertItem(AddRowBox.Text, PositionBox.Text);