2

How to rebind the selected values to kendo multiselect dropdownlist with checkbox on page load and get those selected values when posting back to server using jquery.

Scenarios : 1. First time - load all data to multiselectbox dropdownlist.

  1. second time - selected values from multiselectbox dropdownlist to controller.

  2. Third time - again re-bind those selected values to dropdownlist as checked in page load and get those selected values again pass to controller.

Here, 3 scenarios not working.

Please kindly help me.

For refernce link : http://jsfiddle.net/draunkin/kfQDg/14/

Note : How to get re-binded values.

var temp = null;

    var warehouseKendoDdl = function() {
        $.ajax({
            url: "http://localhost:49989/Home/Products",
            type: 'GET',
            dataType: 'json',
            async: false,
            traditional: true,
            contentType: "application/json; charset=utf-8",
            data: {},
            success: function(data, status, xhr) {
                temp = data;
                console.log("http status - " + xhr.status);
                console.log("http statusText - " + xhr.statusText);
            },
            error: function(jqXHR, textStatus, errorThrown) {
                console.log(jqXHR.status + ' - ' + textStatus + ' - ' + errorThrown);
            }
        });
        return temp;
    }();

    var myMultiselect = $('#testMultiSelect');

    myMultiselect.kendoMultiSelectBox({
        dataTextField: "Name",
        dataValueField: "Value",
        dataSource: warehouseKendoDdl.items,
        emptySelectionLabel: "Please select...",
        value: warehouseKendoDdl.selectedValues
    });


    myMultiselect.data("kendoMultiSelectBox").bind("selectionChanged", function(e) {
        $('#results').html("selected item count: " + e.newValue.length);
    });

0 Answers0