I have a WebDropDown populated at the server, and would like to client-side set or clear the checkbox on a particular item
<ig:WebDropDown ID="MyDropDownControl" runat="server" DisplayMode="DropDownList" EnableMultipleSelection="True" MultipleSelectionType="Checkbox" />
var ctrl = $find('MyDropDownControl');
var item0 = ctrl.get_items().getItem(0);
// these next two statements do select/unselect
// but no effect to the checkbox
item0.select();
item0.unselect();
// this does set the checkbox, but seems rather dangerous
item0.get_element().childNodes[0].checked = true;
Thank you!
Thanks Angel!
Really appreciate your help!
Hi,
Currently the checkbox state when checkbox-type multiple selection is used, is not updated when you use select() / unselect(). The way to check and unckeck it is as you have currently specified (as a workaround only).
I have submitted a request to fix this behavior so that it works out of the box.
Hope it helps,
Angel