Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
What is the "proper" way to set/clear a WebDropDown checkbox
posted

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!

Parents Reply Children