Kendo Dropdown: getting the selected item
You could use the dataItem method of the ComboBox/Dropdown to get the model for the selected item. As a side note, the context of the event handler is the ComboBox and it is accessible via this.
E.g.
function
change(e) {
var
text =
this
.text();
var
value =
this
.value();
var
object =
this
.dataItem(
this
.select());
}
I hope that this information was helpful for you. I wish you a great day!
and another way is :
var ddl= $("#ddl").data("kendoDropDownList").dataItem($("#ddl").data("kendoDropDownList").select()).FieldName;
//FieldName is the text field of DataSource --- .DataTextField("FieldName")
Ref : http://www.telerik.com/forums/getting-the-selected-item
Ref : http://stackoverflow.com/questions/21600895/how-to-get-dropdowns-selected-items-text-in-kendo-ui
Comments
Post a Comment