View Full Version : grid and newly inserted rows

24 Feb 2011, 8:46 AM
I have a grid editor with crud and I would like to know how can I manage newly inserted rows.
Crud does things well but does not store the id generated by db when inserting rows

this causes issues when trying to edit after that the row, then this will create a new row instead in the db (because id is null, so it's an insert and not an update !)

Is there a way to retrieve id (and how ?), I haven't found any documentation about that
Also I tried to refresh the store with store.load() after an insert, but this does nothing (firebug is showing no ajax request)

24 Feb 2011, 8:57 AM
Your server should return the newly created record (with the assigned id) to the client after a create request.

25 Feb 2011, 1:01 AM
is there any format I should use to do this ?
also, what is the function used by extjs to apply the new id ?

29 Mar 2011, 11:53 AM
I am not sure what the return value should be either. How do I reference the id that it sends with the create json so the records match if there are more then 1?