Please refer to your official sample/demo page: https://es.infragistics.com/samples/aspnet/drop-down/multi-selection
Is this by design? What is the point of allowing selection using checkboxes if there is no reliable way to access them using the selecteditems array?
Is there any way to get the list of items that are currently checked?
I am not using the edit control part of the drop down. I have disabled it by setting the DisplayMode to DropDownList and with "eventArgs.set_cancel(true);" in the ValueChanging client-side event.
I have a separate label on the page where I display a comma delimited list of the currently selected items using the following client-side function triggered on SelectionChanged:
function onSelectedIndexChanged(sender, eventArgs) { var Items = eventArgs.getNewSelection();
var ItemsString = ""; var Delimiter = "";
if (Items.length > 1) Delimiter = ", ";
for (i = 0; i < Items.length; i++) { ItemsString += Items[i].get_text(); if (i < (Items.length - 1)) ItemsString += Delimiter; }
$get("<%=selLabel.ClientID%>").innerHTML = ItemsString;}
Just as in your demo, this only works as long as the user uses their mouse to check and uncheck the items' checkboxes. The moment they use the keyboard to navigate through the list, it breaks.
To reiterate, is there any way I can get a list of items that are checked?
If not, is there any way I can disable navigating through the list using the keyboard? Using "eventArgs.set_cancel(true);" for the InputKeyUp and InputKeyDown events does not help. Any other thoughts?
Thanks.
Hi,
You can find the attached sample, as promised. Please let me know if you need something else. The issue I have submitted (to fix this behavior officially) is : 19915.
I will be fixing this shortly as well.
P.S: In the attached sample you will need to add ig_res (for the styles)
Thanks,
Angel
Hi Angel,
Thanks very much for the sample. I have not been able to try it yet because the sample uses a newer version of the Infragistics DLL than what I have. I currently have v9.1.20091.2055 (which is the newest version that I can find in the "Services Releases" section on your web site. It looks like your sample is using a newer build - v9.2.20092.1.
Can you please let me know where I can download this service release from. Alternatively, will your sample work with the older version that I have?
This is an internal version number that we use, it is not part of official build that is publicly available.
Otherwise the sample should work fine with any service release version, I think 2055 should be fine.