Datasource transport.update (function) never gets called after edit

2 posts, 0 answers
  1. Sergiy
    Sergiy avatar
    1 posts
    Member since:
    Oct 2012

    Posted 26 Jan 2018 Link to this post

    I have an issue using ListView, DataSource and Angular where transport is fully custom, e.g. transport update/create/read and delete are functions.

    I used original plunkr  from and added edit template, edit/cancel and update buttons. method works as expected and returns original "product" array from the example however upon edit of the ProductName, transport.update is never executed and no error is thrown. I've added schema/model with id and other columns however it has no impact.

    Please help

  2. Stefan
    Stefan avatar
    3039 posts

    Posted 30 Jan 2018 Link to this post

    Hello, Sergiy,

    Thank you for the example.

    After updating it I noticed that the issue occurs when the input is bound to "ng-model" and I can assume that the internal logic that is listening for changes is not detecting the change when it is coming from the model.

    In this scenario I can suggest using the ng-change directive to set the dataItem as dirty which will trigger the update:

    <input ng-change="dataItem.dirty=true" ng-model="dataItem.ProductName"></input>

    This is the modified example:

    I hope this is helpful.

    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.
Back to Top