1. #1
    Sencha User
    Join Date
    Oct 2010
    Location
    India
    Posts
    84
    Vote Rating
    0
    Anup Rana is on a distinguished road

      0  

    Default add row in grid panel using extjs4

    add row in grid panel using extjs4


    Hi,
    i want to add a row after a selected row using extjs4.

    can anyone help me.


    thanks in advance.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    78
    Vote Rating
    1
    kskrumpet is on a distinguished road

      0  

    Default


    myGrid.store.insert(myGrid.indexOf(myGrid.getSelectionModel().getSelection()[0]),myNewRecord);

    In brief, "myGrid.getSelectionModel().getSelection()[0]" will get the first selected record (assumes there is one!)

    myGrid.indexOf(...) gives you the index of the selected record.

    Rich
    ExtJS Developer, amongst other things. http://wintermedia.co.uk/extjs-consultancy

Thread Participants: 1