Results 1 to 5 of 5

Thread: Refresh only one row in a Grid

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Milano
    Posts
    98

    Default Refresh only one row in a Grid

    Hi!

    How can I write a code that can refresh only one row in a grid???
    I have search in the Api docs but don't found nothing...

    Is there a mode?

    I have a GridPanel with a JsonStore data and a ColumnTemplate with Xtemplate.
    With the
    Code:
    Ext.getCmp("mygridid").getStore().reload()
    or the
    Code:
    Ext.getCmp("mygridid").getView().refresh();
    I refresh all the store and grid but I want to refresh only one row,possibli selecting the row with the RowSelectionModel.

    If someone have ideas write here.

    thanks a lot

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Milano
    Posts
    98

    Default

    After 2 days of head breaking I have found the solution.....and is soooo small!!!

    Code:
    grid.getView().refreshRow(record);
    With this code you can refresh a single row in the grid,and I do it after a gridrowselect.
    Really very happy!!!

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2011
    Location
    Reston, VA
    Posts
    53

    Default

    Yep. Private functions are always fun...

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    Milano
    Posts
    98

    Default

    Yes!
    The fact is that there isn't in the Api Documentation EXT 3.4 this method (refreshRow) in the GridView ...and so I didn't know it existance....but searching in the web I find this page : http://www.sencha.com/learn/grid-faq/
    and there I found the solution.

    I don't know why it isn't documentated in the API....

    Bye!

  5. #5

    Default

    In Ext 5.0+ (probably also 4.0) the method is now called refreshNode().

Posting Permissions

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