[CLOSED] TreeGrid: refresh

  1. #1

    [CLOSED] TreeGrid: refresh

    Hello,

    I would like to refersh the content of a TreeGrid like a GridPanel.

    When the GridPanel is based on a store I only load this store to refresh the GridPanel.

    In the case of the TreeGrid I have a TreeLoader with the DataUrl specified.

    How can I refresh it. I try with #{treegrid}.load() or #{treeGrid}.reload(), but none of both work.

    Romuald.
    Last edited by geoffrey.mcgill; Jul 20, 2010 at 7:57 PM.
  2. #2
    Hi,

    TreeGrid is tree therefore you have to refresh it as tree

    - if you use AsyncTreeNode (with loaders) then you can use 'reload' method of the async mode
    Tree1.getRootNode().reload
    - if use TreeNode then please see
    https://examples1.ext.net/#/TreePane...h_Static_Tree/

    Also see Loaders folders in the Examples Explorer
    #/TreePanel/Loaders/
    Last edited by geoffrey.mcgill; Jul 19, 2010 at 10:14 PM.
  3. #3
    Hello,

    I use the Treegrid as follow

    <ext:TreeGrid ID="treeGrid" runat="server" Title="titre" AutoScroll="true">
    <Columns>
    <ext:TreeGridColumn DataIndex="Column1" Width="200" />
    <ext:TreeGridColumn DataIndex="Column2" Width="200" />
    </Columns>
    <Loader>
    <ext:TreeLoader DataUrl="/Controller/action/" RequestMethod="GET">
    <BaseParams>
    <ext:Parameter Name="para1" Value="Value1" Mode="Raw" />
    <ext:Parameter Name="para2" Value="Value2" Mode="Raw" />
    <ext:Parameter Name="para3" Value="Value3" Mode="Raw" />
    </BaseParams>
    </ext:TreeLoader>
    </Loader>
    
    </ext:TreeGrid>
    And I want to refresh it within the event Handler of each parameter. I mean when the value of para1 or para2 or para3 changes the TreeGrid should be relaoded within new content according to the values of its parameters.

    Romuald.
  4. #4
    Hi,

    If your root node is AsyncTreeNode (I guess that it is true because you use tree loader) then you can call the following code in the event handler
    treeGrid.getRootNode().reload();
  5. #5
    Thanks, It works.

    Romuald.

Similar Threads

  1. Replies: 13
    Last Post: May 28, 2012, 5:32 PM
  2. Replies: 2
    Last Post: Jan 22, 2012, 2:00 PM
  3. Replies: 2
    Last Post: Jul 30, 2010, 12:37 AM
  4. [CLOSED] TreeGrid: Header width when treegrid is flexible
    By wazige in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 06, 2010, 10:44 AM
  5. [CLOSED] [1.0] TreeGrid Help
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 21, 2010, 11:54 AM

Posting Permissions