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
540
Infragistics 13.1 Webdropdown issues
posted

Hi ,

We have web dropdown in our page with checkboxes for multiselection(MultipleSelectionType="Checkbox" ). We have All, Opt 1, Opt 2 , Opt 3 in the list items. We need to disable other options, if we select All. If we unselect All then other options should be enabled. We have implemented the below code.

function selectionChanged(sender, eventArgs) {
var activeIndex = sender.get_activeItemIndex();
var items1 = eventArgs.getNewSelection();
var items = sender.get_items();
if (activeIndex == 0 & items.getItem(0).get_selected() == true) {
for (var i = 0; i < items.get_length(); i++) {
var item = items.getItem(i);
if (i != activeIndex) {
items.getItem(i).unselect();
items._items[i].set_disabled(true);
}
}
}
else {
for (var i = 0; i < items.get_length(); i++) {
var item = items.getItem(i);
if (items.getItem(0).get_selected() == true) {
items.getItem(activeIndex).unselect();
}
else {
for (var i = 0; i < items.get_length(); i++) {
if (activeIndex == 0) {
if (i != 0) {
items._items[i].set_disabled(false);
items._items[i].get_element().all[0].disabled = false;
}
}
}
}
}
}
}

It is not working in Safari and Chrome browsers. It is only working in IE. Kindly let me know how to fix the issue.