Reloading kendo ui grid the row item code executes an error

后端 未结 1 1057
耶瑟儿~
耶瑟儿~ 2021-01-26 02:54

I\'ve a web application with kendo ui grid. The grid is load with Bakbone.js when I click a button and I can remove a row with the next code:

$(document).on(\"cl         


        
1条回答
  •  再見小時候
    2021-01-26 04:00

    Not sure, but your grid is actually not the same grid but the old (before the reload) one and second grid is created.

    Following line changed:

    var item = $('#grid').data().kendoGrid.dataItem($(this).closest("tr"));
    

    updated version.

    I suggest you to just change the data through the dataSource.data() method instead of recreating the Grid. Or change your logic so you actually destroy the widget before recreating it.

    0 讨论(0)
提交回复
热议问题