On DropDownClosed client-side event of the WebDropdown, I need to know how to get the Web dropdown's selected item collection and get its text, value and index. I am not using the check boxes in the drop down, but I allow multi selection.
1. What would be the method to get the selected items collection in javascript.
2. What is the property of the item, that tells if the item is selected.
Thank you.
hi,
To get array of currently selected items:
dropDown.get_selectedItems(); // works for both single and multiple selection
To check if an item is selected or not:
item.get_selected(); // returns true or false if item is selected or not, respectively
To get any item from the current collection of dropdown items:
dropDown.get_items().getItem(i); // where "i" is the item index.
Hope it helps,
Angel
Is there any help file for client side odject model?
Great. Thank you!