Erasing all data (Angular)

2 posts, 0 answers
  1. Curt
    Curt avatar
    6 posts
    Member since:
    Mar 2015

    Posted 15 Mar 2015 Link to this post

    I have a dropdown to select a new calendar to view.  That also triggers new resources.  I need to remove all the current data and resources, and then reload it.

    What is the best way?  I am currently using the ObservableArrays like:

    event = new kendo.data.ObservableArray([]);
    $scope.ds = new kendo.data.SchedulerDataSource({
    data: event
    });

    Setting event to null doesn't work, same for $scope.ds, I even iterate over event calling pull, nothing makes the data go away.

    Help :)

    I should mention, I put data back by using event.push

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 18 Mar 2015 Link to this post

    Hello Curt,

    I would suggest you clear the data using data source's data method. This will clear the data source content and will update the scheduler. If this does not work, then I will ask you to send us a repro demo that demonstrates what exactly is going wrong.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top