Retain the old value of the cell when the update event of the data source gives error.

2 posts, 0 answers
  1. Anagha
    Anagha avatar
    6 posts
    Member since:
    Apr 2017

    Posted 04 May 2017 Link to this post


    I am trying to edit a cell inline. When there is an error in the update controller, the model state returns an error but the cell value gets changed to the edited value which threw error. I want to retain the earlier value if there are any errors in the model state without calling the data source read() method.

    Is there any way to achieve this?


    Thank you.

  2. Veselin Tsvetanov
    Veselin Tsvetanov avatar
    732 posts

    Posted 05 May 2017 Link to this post

    Hello Anagha,

    By default, when an error has been returned from the controller on inline Task edit, the edited value will be reverted to the last valid value, without the need to cal the DataSource read() method. Here you will find a small Dojo sample, that demonstrates the above. You will notice, that the Update URL is not a correct endpoint, so a 404 error is returned to the client.

    Thus, in case of any issues with the model state on the server, I would suggest you to return an error from the controller action, so the value would be reset.

    Veselin Tsvetanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 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