Please refer to your official sample/demo page: https://ko.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 Angel,
Quick follow up.
I included the selectionChanging and valueChanging functions in my application and it works as desired!!! Thanks very much! I really appreciate your prompt assistance. The sample web site code was very timely and very easy to re-use. Thanks again!
The only bit of functionality that I would like to add is in the selectionChanging function - the user should be able to navigate through the list using the keyboard navigation keys (this works perfectly now) and check or uncheck the checkboxes using the spacebar (needs to be added). I am not sure if this is just a simple addition to the selectionChanging function or, if it is more complex and needs to be added to the official fix.
Hi,
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.
Thanks,
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?
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 very much! Yes, a sample website that has this functionality will be most useful. I shall look forward to getting it early next week. Thanks again for offering to do this for me.
As for the July service patch, is it available to download on your web site? I don't see it yet; may be it will show up next week.
If you or the developers need any help with adding this functionality in to the August service patch, or, if I can help with any testing, please let me know.