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.
Unfortunately, activation email could not send to your email. Please try again.

How to get value for id, text or value fields?

Thread ID:

Created:

Updated:

Platform:

Replies:

118983 Apr 30,2015 05:35 PM May 4,2015 06:32 AM JavaScript 1
loading
Tags: ejListBox
Edgar Ricardez Peralta
Asked On April 30, 2015 05:35 PM

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 () {
      $('#selectExperts').ejListBox({
         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
   }
</script>


Thanks for your help


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

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

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you have any questions.

Best,
Ezhil S

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.

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.

;