[CLOSED] Refreshing Grid Data

  1. #1

    [CLOSED] Refreshing Grid Data

    I am on my last step to refresh my grid because of a messagebus notification, but I have an issue with this.getView().refresh() is not refreshing my grid. The MessageBusListener is working:

    <ext:GridPanel ...>
       ...
       <MessageBusListeners>
          <ext:MessageBusListener Name="refresh" Handler="alert(data); this.getView().refresh();" />
       </MessageBusListeners>
    </ext:GridPanel>
    I have a store, view, pagingToolbar plus other items defined in the GridPanel:

    <ext:GridPanel ...>
       ...
       <ext:Store ID="ActiveUsers_Store" runat="server" RemoteSort="true" PageSize="25" onReadData="ActiveUsers_RefreshData">
          <Proxy>
             <ext:PageProxy />
          </Proxy>
          <Model> ... </Model>
          <AutoLoadParams>
             <ext:Paramater Name="limit" Value="25" Mode="Raw" />
             <ext:Paramater Name="start" Value="0" Mode="Raw" />
          </AutoLoadParams>
          <Sorters>
             <ext:DataSorter Property="DisplayNm" Direction="ASC" />
          </Sorters>
       </ext:Store>
       ...
       <View>
          <ext:GridView runat="server" LoadingText="Loading users ..." StripeRows="true" TrackOver="true" />
       </View>
       ...
       <BottomBar>
          <ext:PagingToolbar ...>
          ...
          </ext:PagingToolbar>
       </BottomBar>
    </ext:GridPanel>
    The grid refreshes properly when I press the PagingToolbar refresh button. Do I need to do something different since I have onReadData defined for my store?
    Last edited by Daniil; May 03, 2012 at 3:17 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Well, this code
    this.getView().refresh();
    doesn't reload the Store.

    To reload the Store please use:
    this.getStore().reload();
    And you don't need to call the view refresh method, it will be called automatically after store reloading.
  3. #3
    Please close the thread. Now with all of this useful information you have provided over the past couple of days I will try to leave you alone to answer other customers while I develop new pages and methods. Talk to you soon.
  4. #4
    Ok, no problem:)

Similar Threads

  1. Replies: 6
    Last Post: May 16, 2012, 9:38 AM
  2. Refreshing data in GridPanels ?
    By Mohammad in forum 1.x Help
    Replies: 1
    Last Post: Nov 19, 2011, 8:19 AM
  3. [CLOSED] Only refreshing data in GridPanel when requested
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 10, 2011, 10:03 PM
  4. Replies: 12
    Last Post: Apr 15, 2011, 2:35 PM
  5. Update data and refreshing grid on server-side !
    By Aleksa007 in forum 1.x Help
    Replies: 0
    Last Post: Mar 03, 2011, 12:25 AM

Posting Permissions