This is a migrated thread and some comments may be shown as answers.

locked: true results in "cannot read property 'removeData' of null"

1 Answer 489 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pat
Top achievements
Rank 1
Pat asked on 19 Dec 2014, 02:06 AM
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!







1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 22 Dec 2014, 01:33 PM
Hi Pat,

I tried to reproduce the problem locally but to no avail – everything is working as expected on our side. Could you please modify this example to reproduce the issue and send it back to us? This would help us pinpoint the exact reason for this behavior.


Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Pat
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or