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.