Destroy Action not called only when inline row just added

3 posts, 0 answers
  1. Mark
    Mark avatar
    30 posts
    Member since:
    Jan 2019

    Posted 14 Mar 2019 Link to this post

    My grid has InLine edit mode. I add a new row and save it through the Edit column button and the DataSource Create Action. Immediately after saving if I delete the new row through the Destroy column button, the DataSource Destroy Action is not called. The Destroy Action is called on any other row that existed when the page was loaded. I can also delete the added row after a page refresh.
  2. Georgi
    Admin
    Georgi avatar
    703 posts

    Posted 19 Mar 2019 Link to this post

    Hello Mark,

    A common cause for the described behavior is when the server does not respond with the created data item (with assigned id field) to the create request. When the server does not respond with the created item, the dataSource does not add the newly created item to the pristine items collection. Which means that the dataSource treats the record as an unsaved item and when the user destroys it, the item is only deleted from the client side.

    Could you please make sure that the create action responds with the saved to the database record?


    Regards,
    Georgi
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Mark
    Mark avatar
    30 posts
    Member since:
    Jan 2019

    Posted 20 Mar 2019 in reply to Georgi Link to this post

    Thank you for the info it helped me get it working.
Back to Top