Edit this page

Access Selected DataValueField

Environment

Product Progress Kendo UI ListBox for ASP.NET MVC
Operating System Windows 10 64bit
Browser IE For PC
Browser Version 11
.Net framework Version 4.6
Visual Studio version Visual Studio 2017
Preferred Language C Sharp
MVC Version MVC 5
View Engine Razor

 

Description

How can I get the DataValueField from the selected item on the change event of the Kendo UI ListBox? 

Solution

  1. Retrieve the selected element.
  2. Based on the selected element, retrieve the information for the dataItem that is associated with the following line:

    function onChange(e) {
        var element = e.sender.select();
        var dataItem = e.sender.dataItem(element[0])
        console.log(dataItem)
    }
    

For more information, refer to the articles on:

  • The select event of the ListBox.
  • The dataItem method of the ListBox.
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy