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!
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
Thanks Angel!
Really appreciate your help!
I tried your sample and it works fine - how i do it: select a few items (check them with the mouse), then click on "Clear using Nodes[0]", and then open the dropdown again - items are unckecked.
About textbox contents being not modified - this is the correct behavior. When items are selected, and there is multiple selection enabled, we do not update the contents of the text input - since this is done programatically. That's only done when selection is done through user interaction.
One can easily update the text input in the following way - for every item that is selected, append its text to some comma delimited string, and at the end do : dropDown.set_currentValue(selectedItemsString, true);
Thanks,
Angel,
I think you missed the point:
It works if you do not do a postbackIt does not work if you do a postback in Firefox - the checkbox remains checkedFF 3.0.11
IE8 works fine
Thanks!
Hello Terry,Thank you for attaching your sample application for the WebDropDown issue you had described when using FireFox version 3.0.11. After downloading and testing your sample, I was able to reproduce the behavior in FireFox and have submitted a request to Development for a resolution for this issue. For the benefit of anyone else encountering the same issue, the development issue number is 19154.
Your support case has been updated with this information and you will be notified when this issue has been resolved.We appreciate you bringing this development issue to our attention. Thank you for using the Infragistics forums and contacting Infragistics Developer Support.Sincerely,Mike D.Developer Support EngineerInfragistics, Inc.
I'm trying to lookup the status of the issue 19154. Do you have the link where I can search on this issue? Can you just tell me the version/hotfix number where this is fixed. I'm currently using 9.1.20091.2055.
Eric
Eric,
According to the bug, the fix was verified in version 9.1.20091.2065. I believe the July service release is build 2067, so it should be present there. Our August service release, which should ship soon, should also have the fix.
regards,David Young