Getting type error while setting the data of DataSource dynamically

2 posts, 0 answers
  1. Hema
    Hema avatar
    20 posts
    Member since:
    Jul 2015

    Posted 14 Oct 2015 Link to this post

    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.​;
                         3:  $('#​grid').data('kendoGrid').setDataSource($scope.​dataSource);

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 16 Oct 2015 Link to this post

    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 $ method.


    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top