DataSource pushUpdate() no longer available

7 posts, 0 answers
  1. John
    John avatar
    4 posts
    Member since:
    Jun 2012

    Posted 19 Mar 2015 Link to this post

    I've been using the pushUpdate method on dataSource for the past few weeks in version 2014.3.1425 and it's worked great, but yesterday I updated to 2015.1.318 and the pushUpdate method is no longer available. Is this intentional?

    My line is $scope.PartsMatrixTreeList.dataSource._pushUpdate(data);

    But looking at the watch in Chrome, there are no push events available:
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 21 Mar 2015 Link to this post

    Hello John,

    The pushUpdate() method is still available, but you have been using the private method, that is not part of the public API. Here is the public API reference that explains this method as well:

    http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-pushUpdate

    Please keep in mind that all properties and methods that start with _ are not intended for public use.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. John
    John avatar
    4 posts
    Member since:
    Jun 2012

    Posted 23 Mar 2015 in reply to Kiril Nikolov Link to this post

    Ok thanks. I've changed my code to $scope.PartsMatrixTreeList.dataSource.pushUpdate(data);

    In 2014.3.1425 I can update my TreeList without problem using the pushUpdate method, but when I switch to 2015.1.318 it adds the updated data as a new node and children to the bottom of my treelist.
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 25 Mar 2015 Link to this post

    Hello John,

    I am not able to reproduce the exact issue, is it possible to send us a runnable sample where we can reproduce the issue and advise you further?

    Thanks for the cooperation.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. John
    John avatar
    4 posts
    Member since:
    Jun 2012

    Posted 01 Apr 2015 in reply to Kiril Nikolov Link to this post

    Hi Kiril,

    Hard to get a demo mocked up as it's so complex. The basics are that we have a TreeList that is dynamically generated by AngularJS. We are doing incell editing with a modal popup. When we apply changes we send all the expanded nodes to the server which then checks each node and sends back the changes. We then take that AJAX response and update the TreeList:

     $scope.PartsMatrixTreeList.dataSource._pushUpdate(data);

    When we are using the 2014 Q3 release the nodes are updated correctly. When we switch to 2015 Q1 the nodes that are sent back are added to the bottom of the treelist. So if we have 10 nodes in the table we'll apply, send 10 data items to the server, get the 10 items back, pushupdate and end up with 20 nodes in the table.

    Hope this makes sense!

    Regards,
    John
  7. John
    John avatar
    4 posts
    Member since:
    Jun 2012

    Posted 01 Apr 2015 in reply to Kiril Nikolov Link to this post

    Hi Kiril,

    It's quite hard to give a demo of our work. What we have is a Treelist that is being generated dynamically by AngularJS and we are doing incell editing. When we click on a cell it will load a bootstrap modal. We then apply some changes that can affect other nodes in the TreeList. What we then do is send all the expanded nodes back to the server and get the latest data for the nodes. When that is returned via the AJAX call we use pushUpdate to sync the data with the TreeList.

    It all works fine in 2014 Q3 but if we just change to using 2015 Q1 we end up doubling the nodes in the TreeList.

    I've attached a js file with the structure of the TreeList and the apply method we use to pushUpdate and sync the TreeList.
  8. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 03 Apr 2015 Link to this post

    Hello John,

     

    Here is a Dojo example with a TreeList and editing, please edit it in order to show the issue that you face and we will be happy to help:

     

    http://dojo.telerik.com/ulElI

     

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready