need help in kendo Multiselect

dashang

Journeyman
here is the reference

Example of Server filtering in Kendo UI MultiSelect widget

Now the thing is i want to add selected item after its being loaded . Since the data source is remote (acts like autocomplete) ,i cant attach it directly

Code:
<!DOCTYPE html>
<html>
<head>
    <base href="*demos.telerik.com/kendo-ui/multiselect/serverfiltering">
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.2.902/styles/kendo.common-material.min.css" />
    <link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.2.902/styles/kendo.material.min.css" />

    <script src="//kendo.cdn.telerik.com/2015.2.902/js/jquery.min.js"></script>
    <script src="//kendo.cdn.telerik.com/2015.2.902/js/kendo.all.min.js"></script>
</head>
<body>

<div id="example" >
    <div class="demo-section k-header">
        <h4>Products</h4>
        <select id="products"></select>
    </div>
    <script>
        $(document).ready(function() {
            $("#products").kendoMultiSelect({
                placeholder: "Select products...",
                dataTextField: "ProductName",
                dataValueField: "ProductID",
                autoBind: false,
                dataSource: {
                    type: "odata",
                    serverFiltering: true,
                    transport: {
                        read: {
                            url: "//demos.telerik.com/kendo-ui/service/Northwind.svc/Products",
                        }
                    }
                }
            });
        });
    </script>
</div>


</body>
</html>

THE URL gets JSON Array

Now i cant use below statement to add selected items:
$("#products").data("kendoMultiSelect").values(json_array) //doesnt work
 
Top Bottom