[CLOSED] Append a Record to the Store

  1. #1

    [CLOSED] Append a Record to the Store

    Guess who - me again :-)

    Today is really rough...

    I got a grid with some data in the store. Now a need to add a new record at the end of the Grid. My 'normal' adding looks like

    grid.getStore().add({ Id: newPseudoGUI() });
    Is there a way to manage the 'position' where the record is inserted ?

    Peter
    Last edited by Baidaly; May 05, 2013 at 10:29 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by Peter.Treier View Post

    grid.getStore().add({ Id: newPseudoGUI() });
    Well, i found it by my self - always searched for something like addAt() at Sencha...

    Now I found
     grid.getStore().insert(index,{ Id: newPseudoGUI() });
    works.

    Please close this thread :-)
  3. #3
    http://docs.sencha.com/extjs/4.2.0/#...-method-insert

    There's an insert method that takes in position and the new record. It is also used in this example:

    http://examples2.ext.net/Examples/Gr...s/HttpHandler/
  4. #4
    Hello!

    Thank you @jchau for your answer!

Similar Threads

  1. Replies: 0
    Last Post: Nov 20, 2012, 2:08 PM
  2. Replies: 1
    Last Post: Dec 22, 2011, 7:17 AM
  3. Replies: 16
    Last Post: May 26, 2011, 11:23 PM
  4. [CLOSED] Store.remove(record) and Store.reload()
    By capecod in forum 1.x Premium Help
    Replies: 2
    Last Post: Nov 08, 2010, 11:03 AM
  5. Replies: 5
    Last Post: May 15, 2009, 8:40 AM

Posting Permissions