MultiColumnCombo for WinForms | ComponentOne
In This Topic
    Basic Operations
    In This Topic

    The MultiColumnCombo control lets you perform some basic operations such as adding items, removing items, and much more in unbound mode. Lets explore how you can perform these operations on MultiColumnCombo dropdown items in the following sections.

    Add Items

    You can add items to the MultiColumnCombo dropdown in unbound mode using AddItem method of the C1MultiColumnCombo class. The AddItem method allows you to populate individual rows within the list.

    Use the following code snippet to add rows to the MultiColumnCombo dropdown.

    C#
    Copy Code
    mcc.AddItem("Item1");
    mcc.AddItem("Item2");
    mcc.AddItem("Item3");
    mcc.AddItem("Item4");
    

    Back to top

    Insert Items

    You can use InsertItem method of the C1MultiColumnCombo class to insert an item at the specified index position of view in the unbound mode. The following code demonstrates how to insert the fifth item in the MultiColumnCombo dropdown.

    C#
    Copy Code
    mcc.InsertItem("Item5", 4);
    

    Back to top

    Remove Items

    The RemoveItem method allows you to remove an item from the specified position in unbound mode. The following code demonstrates how to remove the selected item from the MultiColumnCombo control:

    C#
    Copy Code
    mcc.RemoveItem(mcc.ItemsCount - 1);
    

    Back to top

    Clear Items

    The ClearItems method removes all items in unbound mode. The following code removes the entire item list from from the MultiColumnCombo dropdown.

    C#
    Copy Code
    mcc.ClearItems();
    

    Back to top