How to get selected values of Kendo Multi Select?

Omar Seleim picture Omar Seleim · Jan 15, 2017 · Viewed 20.8k times · Source

I'm using Kendo multi select as follow but i can't get selected values

var multiselect = $("#SelectRoles").data("kendoMultiSelect");
var selectedData= [];
var items = multiselect.value();
for (var itm in items)
{
   selectedData.push(itm);
}

but array selectedData return indices of items in multiselect not values .

Answer

volvox picture volvox · Jan 15, 2017

Use this other one returns indices.

var multiselect = $("#SelectRoles").data("kendoMultiSelect");
var selectedData= [];
var items = multiselect.value();
for (var i=0;i<items.length;i++)
{
   selectedData.push(items[i]);
}