Reload Tree Panel

  • Hi There,

    I saw the mytreeloader extension, but I'm not sure if that's what I need.

    Here is my code
    var navpanel = new Ext.tree.TreeLoader({
    dataUrl:'json.php'
    });

    var treePanel = new Ext.tree.TreePanel({
    id: 'tree-panel',
    title: 'Navigation',
    region:'west',
    width: 200,
    minSize: 150,
    autoScroll: true,
    margins: '0 5 0 0',
    rootVisible: false,
    lines: false,
    useArrows: true,

    loader: navpanel,

    root: new Ext.tree.AsyncTreeNode()
    });

    I simply want to reload the treepanel from the same source.
    Is this doable? I feel like there should be a reload function somewhere, like we have with the data store.

    Thanks!

    Thanks!


  • Ext.getCmp('tree-panel').getRootNode().reload();


  • Ext.getCmp('tree-panel').getRootNode().reload();

    YESS!! PERFECT THANK YOU!! :-)


  • is this helping?

    for treeloader docs.

    load( Ext.tree.TreeNode node, Function callback ) : void Load an Ext.tree.TreeNode (http://localhost/ext-2.1/docs/output/Ext.tree.TreeNode.html) from the URL specified in the constructor. This is called automatically when a node is expanded, but may be used to reload a node (or append new children if the clearOnLoad (http://localhost/ext-2.1/docs/output/Ext.tree.TreeLoader.html#clearOnLoad) option is false.) Parameters:
    node : Ext.tree.TreeNode
    callback : Function Returns:
    void







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Reload Tree Panel , Please add it free.

    editTags: xn--4cr.com