ASP.NET ComboBox - Client-Side API - Add Multi-Column Items

Add Item


The ComboBox control provides client-side methods for adding / removing items.

  • Use the add method of the options collection to add items to the list.

    Usage: ComboBox1.options.add(text [, value] [, index]);
    - text - the text of the new item;
    - value - the value of the new item (same as text if not specified);
    - index - the position in the list where the new item should be added
          (if not specified, the item will be added at the end of the list);

  • Use the remove method of the options collection to remove items to the list.

    Usage: ComboBox1.options.remove(index);
    - index - the index of the item to be removed;

This example uses overriden client-side methods of the control for allowing users to add multi-column items.



« Back to examples