This is a migrated thread and some comments may be shown as answers.

Destroy Action not called only when inline row just added

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 14 Mar 2019, 10:47 PM
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 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 19 Mar 2019, 02:08 PM
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.
0
Mark
Top achievements
Rank 1
answered on 20 Mar 2019, 05:48 PM
Thank you for the info it helped me get it working.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Mark
Top achievements
Rank 1
Share this question
or