All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Hi
I'm using a multiselect and trying to select 2 values programmatically but only the first is really showing. Here is a piece of code of what i'm doing.
var multi= $("#pilotProgram").data("kendoMultiSelect");
multi.value(["1", "2"]); multi.trigger("change");
Thank you
I also tried the filter part
$("#pilotProgram").kendoMultiSelect({
dataSource: [
{ value: "1", text: "Option A", isDeleted: false },
{ value: "2", text: "Option B", isDeleted: false },
{ value: "3", text: "Option C", isDeleted: false },
{ value: "4", text: "Option D", isDeleted: false },
{ value: "5", text: "Option E", isDeleted: false }
],
dataTextField: "text",
dataValueField: "value",
select: function (e) {
if (e.dataItem.isDeleted) {
e.preventDefault();
}
},
change: function (e) {
assObserv.dataSource.data()[0].pilotProgram = this.dataItem();
});
//This part is inside change event of the observable (assObserv)
var pilotMulti = $("#pilotProgram").data("kendoMultiSelect");
pilotMulti.dataSource.filter({});
pilotMulti.value(["1", "2"]);
pilotMulti.trigger("change");