I have a WebDropDown control with multi-select checkbox option enabled.
After writing the SelectedIndexChanged javascript function the checkboxes are not checked at all -
function selectedIndexChanged(sender, eventArgs) {
var newItems = eventArgs.getNewSelection();
var newItemsString = "";
for (i=0;i<newItems.length;i++)
newItemsString += newItems[i].get_index() + ", ";
alert(newItemsString);
}
This is a piece of code that I copied from the samples but it does not work.
Could you somebody please suggest what could be wrong?
I have the same problem. I copied this code from your sample and am using multiple selection. Everytime I type a value to filer the drop list I get the done with errors icon on the bottom of the page and get this error.
Object doesn't support this property or method.
It is failing on this line.
newItemsString += newItems[i].get_index() +
", ";
Hi ,
The code only prints the list of selected items, but you will still need to perform the selection either manually (by checking some of the items), or through code, by calling .select() on the items you want to be selected. If you already do that, and the issue is that the above code doesn't show any items as selected, then this is very strange - I will take a look if that's the case.
Thanks in advance for the feedback,
Angel