We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I get check items (in JavaScript)?

Thread ID:

Created:

Updated:

Platform:

Replies:

132102 Aug 14,2017 02:59 PM UTC Aug 16,2017 04:39 AM UTC JavaScript 3
loading
Tags: ejDropDownList
tomer
Asked On August 14, 2017 02:59 PM UTC

Hi,
How can I get the checked items list ?
I would like to display the checked items in JavaScript alert.

I tried some codes but it doesn't work for me:

var oDevices = $("#<%=DevicesDropDownList.ClientID%>").data("ejDropDownList");

alert(oDevices.getChecked()); //failed

alert(oDevices.getCheckedItems()); //failed

for (var i = 0; i < oDevices .model.selectedIndices.length; i++) {
     alert(oDevices.model.selectedIndices[i].checked); //failed
}

Thanks for help.
  Tomer

Keerthana Rajendran [Syncfusion]
Replied On August 15, 2017 05:45 AM UTC

Hi Tomer, 
 
Thank you for contacting  Syncfusion support, 
 
Way 1: We suggest you to use getSelectedItem method to get the selected items. You can use getSelectedValue method  to get the value of selected item 
 
Way 2: You can also use change or checkChange event to get the value or text of selected items in arguments 
 
We have prepared a sample based on this. Please refer to the below given link 
 
 
 
Regards, 
Keerthana. 


tomer
Replied On August 15, 2017 06:16 AM UTC

Thank you,

Works great !


Keerthana Rajendran [Syncfusion]
Replied On August 16, 2017 04:39 AM UTC

Hi Tomer,  
Thanks for your update. We are happy to hear that our suggestion resolved your issue. Please get back to us if you require any further assistance on this. We will be happy to assist you 
Regards, 
Keerthana  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;