0
votes

I have a kendo grid and my bebavior is below:

  • Reorder column using mouse drag&drop
  • Resize column using mouse drag&drop
  • Hide column by columnMenu
  • Show column by columnMenu

After those event, grid.dataSource.data() = null, the whole grid only have the header row, the data rows are disappeared. I have to add the code to keep the grid looks well:

columnReorder: function(e) {
    $timeout(function () {$scope.grid.dataSource.data(e.sender.dataSource.data());});
},
columnResize: function(e) {
    $timeout(function () {$scope.grid.dataSource.data(e.sender.dataSource.data());});
},
columnHide: function(e) {
    $timeout(function () {$scope.grid.dataSource.data(e.sender.dataSource.data());});
},
columnShow: function(e) {
    $timeout(function () {$scope.grid.dataSource.data(e.sender.dataSource.data());});
}

But I have no idea about why the grid data lost when I resize/reorder/hide/show the column.

Please help me out.

1
try empty array? grid.dataSource.data([])himawan_r

1 Answers

0
votes

The root cause: When I use kendo-grid I set an attribute:k-rebind="gridOption"

see more details: http://www.telerik.com/forums/angular-k-rebind-grid-column-resize-causes-refresh