1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    866
    Vote Rating
    0
    micgala is on a distinguished road

      0  

    Default GridView refresh row

    GridView refresh row


    Hi.

    I need that a single row in a grid gets refreshed (and then its renderer is called).

    How it is possible to do this?

    The GridView does not provides a method to refresh a single row, and I do not need to refresh the whole grid...

    Is there anyway of calling the renderer of a single row in the grid?

    PS: on ext-js, this was possible by calling gridView.refreshRow(rowIndex)

    Thanks for helping,
    Michel.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,706
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    Override GridView to make refreshRow public or just update your model in that specific row

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    866
    Vote Rating
    0
    micgala is on a distinguished road

      0  

    Default


    Hi. Thanks very much for your response.

    So if I just update the model in one specific row, then the Renderer will be automatically called, which means I don't need to call explicitly the refresh method?

  4. #4
    Ext GWT Premium Member
    Join Date
    Dec 2009
    Posts
    343
    Vote Rating
    0
    raghavmurali is on a distinguished road

      0  

    Default


    Dear micgala,
    If you got the solution pls share your override program to us. We are also facing the same problem.

  5. #5
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    866
    Vote Rating
    0
    micgala is on a distinguished road

      0  

    Default


    Hi, I created a jsni method, like this:

    PHP Code:
    private native void refreshRow(GridView viewint row/*-{
            view.@com.extjs.gxt.ui.client.widget.grid.GridView::refreshRow(I)(row);
        }-*/

    So, for refreshing a row on a Grid, pass the gridView of that grid, and the row.

    Regards,
    Michel.

  6. #6
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      1  

    Default


    @micgala, why don't you just update model and store? model.set(x,y), store.update(model). Then grid row gets rerendered or am I wrong?

  7. #7
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    866
    Vote Rating
    0
    micgala is on a distinguished road

      0  

    Default


    Hi. Well, yes... if you change the model, then I guess that is acceptable.
    But in my case, I was not changing the model, and I still wanted the row to be refreshed.
    Thus, it would make not much sense to call store.update... a simple refresh in the grid would make more sense, thus, I used the refresh method...

    But this was long ago... I don't exactly remember my requirements back then :-)

  8. #8
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by micgala View Post
    But this was long ago...
    Ah.. I see Sorry!