I have an already working datagrid that is pulling data from the server. The user requested that I lock the first column by default, so I added the bolded code:
$scope.mainGridOptions = {
dataSource: vm.data.workOrders,
sortable: true,
groupable: true,
reorderable: true,
resizable: true,
pageable: {
refresh: $scope.getWorkorders,
buttonCount: 5
},
selectable: true,
filterable: true,
columns: [{
field: "workorderId",
title: "Workorder",
width: "90px",
locked: true,
template: "<span style='white-space: nowrap; text-overflow: ellipsis;' title='#:workorderId#'>#:workorderId#</span>"
}
// Removed a bunch of columns here
]};
But when I run the application again, I get this error:
"Cannot read property 'removeData' of null"
As I was bouncing through the code, it seems to be in the process of destroying something (if I remember right, the datasource) when it failed, which is why I'm guessing the var is null.
Am I missing something simple - why would pre-locking a column cause the Kendo Grid to crash? Removing the property makes the problem go away.
(As you can see from the $scope, I'm using Angular)
Thanks for any pointers!
$scope.mainGridOptions = {
dataSource: vm.data.workOrders,
sortable: true,
groupable: true,
reorderable: true,
resizable: true,
pageable: {
refresh: $scope.getWorkorders,
buttonCount: 5
},
selectable: true,
filterable: true,
columns: [{
field: "workorderId",
title: "Workorder",
width: "90px",
locked: true,
template: "<span style='white-space: nowrap; text-overflow: ellipsis;' title='#:workorderId#'>#:workorderId#</span>"
}
// Removed a bunch of columns here
]};
But when I run the application again, I get this error:
"Cannot read property 'removeData' of null"
As I was bouncing through the code, it seems to be in the process of destroying something (if I remember right, the datasource) when it failed, which is why I'm guessing the var is null.
Am I missing something simple - why would pre-locking a column cause the Kendo Grid to crash? Removing the property makes the problem go away.
(As you can see from the $scope, I'm using Angular)
Thanks for any pointers!