Hybrid View
-
19 May 2012 12:47 AM #1
Answered: extjs 4.1 tree refresh a specific node
Answered: extjs 4.1 tree refresh a specific node
I would like to refresh a node of a tree.I try something like that to refresh the root and it worked:
But now I would like to refresh only one Node and not the whole tree.Code:this.getStore('MyTreeStore').load({ params: { id: this.getId().getValue()} });
-
Best Answer Posted by Ujjwal Reddy
If you want to load a particular node, then pass a node/record object in the store's load() call. This will load the data of that node (similar to an expand request of the node).
Code:this.getStore('MyTreeStore').load({ node: someNode});
-
21 May 2012 1:39 AM #2
-
21 May 2012 5:50 AM #3
Why just not:
PHP Code:var rowId = 1,
columnDataIndex = 1,
node = treepanel.getStore().getNodeById(rowId);
node.set(columnDataIndex, value);
-
21 May 2012 7:01 AM #4
but it will make an update request, is it possible without that ? Just make a GET request to the server for a specific node.
-
21 May 2012 10:42 PM #5
I don't understand you. This node is specified by rowId and columnId. It node.set will update only this one node.
-
22 May 2012 3:32 AM #6
Yes but it change the data of my node and I don't want to change the data, I just want to refresh.
Is there any other way to make a refresh rather than update the node ?


Reply With Quote