0
votes

I have a problem with my KendoGrid.

I have some commands in the last Column of my Grid. One of them calls up a delete function, in which a new KendoWindow opens up. And now i need to display the Computer name (which is a field of the grid) of this row in the window.

In the delete function I tried to get the Data by:

function delete() {
        var grid = $("#grid").data("kendoGrid");
        var selectedRow = grid.selectedRow();
        var data = this.dataItem(selectedRow);
        var ComputerName = data.ComputerName;

        //initialize and open window 
        .
        .
    };

And to show it in the window I tried an ASP data-bind:

Computername:<span id="ComputerName" data-bind="text: ComputerName"></span>

But it doesnt work. I am new to this topic, so please apologize if my idea doesn't make any sense :D

1

1 Answers

0
votes

Use the activate event of the window to actually bind the content of the window to that dataItem (called data in your case);

$('#windowName').data().kendoWindow.bind('activate',function(e){
   kendo.bind(this.element,kendo.observable(data))
})