[CLOSED] TreePanel refresh tree node

  1. #1

    [CLOSED] TreePanel refresh tree node

    On TreePanel how can I refresh tree node from direct event?
    For example: I have one node (parent). On that node I need to add new node (child). First I call direct event to insert node data into database. After that event I need to call method that refresh parent node and child nodes.
    How to do this?
    Thanks.
    Last edited by Daniil; Dec 22, 2011 at 3:35 AM. Reason: [CLOSED]
  2. #2

    Are you trying to refresh on client side?

    After a direct method, you can specify a success function to run when the callback returns. This is one we use:

    #{DirectMethods}.CreateGroup('test', { success: function (result) { #{GridPanel1}.Refresh(); } });
  3. #3
    Hi,

    Please clarify what do you mean under "refresh a node"?

    Do you use any kind of TreeLoader?
  4. #4
    "Refresh a node" means that when I click on one node ajax loads all children of parent node.
    I do not use TreeLoader.

    I use this example https://examples1.ext.net/#/TreePane...Method_Loader/ . In this example children nodes loads when user click on tree node. After that click child nodes are loaded. After that user for example insert new record into database. That record is one node. I need to reload nodes on button direct click. That means "refresh a node".
  5. #5
    You need to call the reload method for a node.

    Example (JavaScript)
    node.reload();
    See also
    http://docs.sencha.com/ext-js/3-4/#!...-method-reload

Similar Threads

  1. Replies: 11
    Last Post: Oct 07, 2011, 9:14 AM
  2. Replies: 16
    Last Post: Jul 19, 2011, 3:53 AM
  3. TreePanel,tree node Font size
    By kiran malgi in forum 1.x Help
    Replies: 0
    Last Post: May 17, 2010, 7:28 AM
  4. [CLOSED] TreePanel state: re-select node after refresh
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Mar 24, 2010, 12:27 PM
  5. Replies: 0
    Last Post: Jan 01, 2010, 6:50 AM

Posting Permissions