Access Selected DataValueField in the ListBox
Environment
Product | Progress® Telerik 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
To achieve the desired scenario:
- Retrieve the selected element.
-
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: