Skip to content Skip to sidebar Skip to footer

Binding Array Of Object To Kendo Grid Popup Multiselect

I'm trying to bind an array of id-value pairs to a kendo grid popup editor. Got everything to work for creating a new record. Popup editor loads the custom editor and successfully

Solution 1:

You're binding the SpaceOfWork to the new widget, but how that widget knows your Model ? I mean, just using data-bind doens't binds the model to the widget, it can't figure that by itself. I have two suggestions:

  1. Set the value in the widget's initialization:

    .kendoMultiSelect({
        value: options.model.ScopeOfWork
    

    Demo

  2. Bind the model to the widget for good:

    let$multiSelect= $('<input data-text-field="name" data-value-field="id" data-bind="value:ScopeOfWork"/>');
    
    kendo.bind($multiSelect, options.model);
    
    $multiSelect
        .appendTo(container)
        .kendoMultiSelect({ ...

    Demo

Post a Comment for "Binding Array Of Object To Kendo Grid Popup Multiselect"