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 to get value for id, text or value fields?

Thread ID:





118983 Apr 30,2015 09:35 PM UTC May 4,2015 10:32 AM UTC JavaScript 1
Tags: ejListBox
Edgar Ricardez Peralta
Asked On April 30, 2015 09:35 PM UTC

Hi Syncfusion team,

The controls HTML5/Javascript are wonderful.

I have implemented ejListBox control
based on this sample

How do I get the value of the id or value property?

This is my code:

<script type="text/javascript">
   var target;
   var empList = [
               { text: "Erik Linden", eimg: "3", desig: "Representative", country: "England" }, { text: "John Linden", eimg: "6", desig: "Representative", country: "Norway" },
               { text: "Louis", eimg: "7", desig: "Representative", country: "Australia" }, { text: "Lawrence", eimg: "8", desig: "Representative", country: "India" }

   $(function () {
         dataSource: empList,height:"240",
         selected: "Onselected",
         fields: { id: "eimg", text: "text", value: "eimg" }
         template: '<div><img class="eimg" src="../images/Employee/${eimg}.png" alt="employee"/>' +
                       '<div class="ename"> ${text} </div><div class="desig"> ${desig} </div><div class="cont"> ${country} </div></div>'

   function Onselected(args) {     
      // Here, I need to get the values for id/value properties

Thanks for your help

Ezhil S [Syncfusion]
Replied On May 4, 2015 10:32 AM UTC

Hi Peralta,

We regret about the inconvenience caused.

We were able to reproduce the problem with getting the id/value of the selected item in list box and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates


Please let us know if you have any questions.

Ezhil S


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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