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.
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"); |
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);
|
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); |
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(); |