New to Kendo UI for jQueryStart a free 30-day trial

Value

methods

Gets or sets the value of the MultiSelect.

Important: If there are no items, the value method will pre-fetch the data before continue with the value setting.

Important: The widget will clear the applied filter if a new value is set. Thus it ensures that the original/whole data set is available for selection.

Important: This method does not trigger change event.

This could affect MVVM value binding. The model bound to the widget will not be updated. You can overcome this behavior by triggering the change event manually using trigger("change") method.

<select id="multiselect" multiple="multiple">
    <option>Item1</option>
    <option>Item2</option>
</select>
<script>
$("#multiselect").kendoMultiSelect();

var multiselect = $("#multiselect").data("kendoMultiSelect");

multiselect.value("Item1");
multiselect.trigger("change");
</script>
Parameters:valueArray|String

The value to set. A String value or an Array of strings is accepted. To clear the value, pass an empty array.

Returns:Array

The value of the MultiSelect.

<select id="multiselect" multiple="multiple">
    <option value="1">Item1</option>
    <option value="2">Item2</option>
</select>
<script>
$("#multiselect").kendoMultiSelect();

var multiselect = $("#multiselect").data("kendoMultiSelect");

// get the value of the multiselect.
var value = multiselect.value();

// set the value of the multiselect.
multiselect.value(["1", "2"]); //select items which have value respectively "1" and "2"
</script>

If initial items are lost in attempt to set new values, probably the widget is filtered by the end user, but no value has been selected. You will need to remove applied filter, before calling value method

<select id="multiselect" multiple="multiple">
    <option value="1">Item1</option>
    <option value="2">Item2</option>
</select>
<script>
$("#multiselect").kendoMultiSelect();

var multiselect = $("#multiselect").data("kendoMultiSelect");

//clear filter
multiselect.dataSource.filter({});

//set value
multiselect.value(["1", "2"]);
</script>
Not finding the help you need?
Contact Support