Results 1 to 4 of 4

Thread: grid and newly inserted rows

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    21

    Default grid and newly inserted rows

    hi
    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)

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Your server should return the newly created record (with the assigned id) to the client after a create request.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    21

    Default

    is there any format I should use to do this ?
    also, what is the function used by extjs to apply the new id ?

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    566

    Default

    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?

    Marty

Similar Threads

  1. singleSelect in CheckboxSelectionModel doesn't work with newly inserted rows
    By sandeep45 in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 1 Feb 2011, 8:35 AM
  2. Replies: 0
    Last Post: 16 Jun 2009, 2:21 PM
  3. Preventing Automatic Id generation in Store for inserted rows
    By r_honey in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 3 Mar 2009, 7:54 PM
  4. How can I submit the newly added grid row
    By dee_rocks in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 10 Sep 2007, 4:08 PM
  5. EditableGrid>Inserting newly created rows>How to set ID of new record?
    By everknown in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 1 Jun 2007, 2:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •