After adding record using add functionality, Edit does not work for added record
hanatharesh2712 opened this issue · comments
I am trying to add record using add functionality in grid.
After adding client record into database the grid does not refreshing so that edit does not work.
Re-produce steps:
1: Click on add icon in right side of the grid.
2: Enter values for that particular record and click on insert button.
3: Go to added record and click on edit icon to edit that record.
4: click on save icon and it gives error because that record doesn't have id property.
Thanks!
If items have ids that should be set by backend, inserting endpoint should return inserted item (with id). In this case controller.insertItem
should resolve the returned deferred with the item returned from the backend. So new row item will have the id.
This is a usual scenario for jsgrid.