1. #1
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Brussels
    Posts
    87
    Vote Rating
    0
    Jenya is on a distinguished road

      0  

    Question How to refresh DataGrid displayed store data?

    How to refresh DataGrid displayed store data?


    After I make some manipulations I extract needed model from the store of the DataGrid and change its data. I want the DataGrid to be updated.

    Does anyone know how to do that?

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,715
    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


    You can simple call
    Code:
    grid.getStore().update(mymodel);

  3. #3
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Brussels
    Posts
    87
    Vote Rating
    0
    Jenya is on a distinguished road

      0  

    Default


    Works, but just for the info for other users:

    Your model class might need to override equals method (comparing by id for instance) if as mymodel you pass another instance.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,715
    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


    Yes sure, the models have to be equal somehow.

Similar Threads

  1. gridpanel store.loadData doesnt refresh data
    By onedaysale in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 Aug 2008, 11:18 AM
  2. sorting problems in the datagrid when using Ext.data.Store
    By vishcio.us in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 1 Jun 2008, 12:58 AM
  3. sorting problems in the datagrid when using Ext.data.Store
    By vishcio.us in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 29 May 2008, 10:12 PM
  4. loading data into a store does not cause the associated grid to refresh
    By bmf1972 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 21 Apr 2008, 11:04 PM

Tags for this Thread