Results 1 to 2 of 2

Thread: add row in grid panel using extjs4

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Location
    India
    Posts
    84
    Vote Rating
    0
      0  

    Default 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
      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

Posting Permissions

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