How to tell DataSource that the data was changed outside?

3 posts, 0 answers
  1. Brett
    Brett avatar
    7 posts
    Member since:
    Sep 2011

    Posted 03 Jul Link to this post

    I have a local data source which is a JS array. I setup transport methods to read/write the data. When the data is modified by Kendo widget like grid it works fine.

    If I modify the array directly outside a widget in JS, how can I tell Kendo that the data source changed?

     

    Thanks!

  2. Stefan
    Admin
    Stefan avatar
    2024 posts

    Posted 05 Jul Link to this post

    Hello, Brett,

    There are different approaches depending on the scenario.

    If a single item is added or deleted, the add and remove method can be used:

    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/add

    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/remove

    The other option is directly passing the changed data using the data method:

    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/data

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Brett
    Brett avatar
    7 posts
    Member since:
    Sep 2011

    Posted 05 Jul in reply to Stefan Link to this post

    Thanks Stefan
Back to Top