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

Getting type error while setting the data of DataSource dynamically

1 Answer 181 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Hema
Top achievements
Rank 1
Hema asked on 14 Oct 2015, 03:09 PM

I am trying to set the data property of the datasource to a new array everytime a change event happens in a grid . It works perfectly for a few clicks and then I get a "Uncaught TypeError: Cannot read property 'removeClass' of undefined " ,in the line 2. arrValues() always returns a value and it is not null .Please let me know what is wrong with the code .

      

                    1:  var setArrayValues =arrValues();

                     2:  $scope.​dataSource.data(setArrayValues);
                     3:  $('#​grid').data('kendoGrid').setDataSource($scope.​dataSource);

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 16 Oct 2015, 08:10 AM

Hello Hema,

 

I am afraid that the issue is not a known one, nor is reproducible in our online demos, so please extract a runnable sample in a Kendo UI Dojo and we will be happy to help.

 

On a side note you can change the data directly using the $scope.grid.dataSource.data() method.

 

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