Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
In a custom tree, after editing the name of a node and then saving, I'd like to be able to refesh the tree to reflect this change. I've tried:
BasePage.Current.ClientTools.RefreshTree("treeAlias");
and that works, but the visually slected node in the tree then moves to the tree root. Is there a way of just refeshing the current node ?
TIA,
Hendy
Hi Hendy,
I think this might be the way:
((BasePage)Page).ClientTools.SyncTree("path", true);
Just testing on my Umbraco custom section but having trouble working out what I need for path part in a custom section.
UPDATE:
This does work you have to specify the path using something like:
"-1,1,1" etc - depending how many levels deep your tree is.
In my custom sections tree I used:
((BasePage)Page).ClientTools.SyncTree("-1," + PropertyId + "," + SpaceId, true);
I found this which helped show how it works underneath:
http://www.java2s.com/Open-Source/CSharp/Content-Management-Systems-CMS/umbraco/umbraco/BasePages/ClientTools.cs.htm
Then looked at Generated source to see what jTree was outputting in my scenario.
Each "li" has Id which is what I think corresponds to the path you build above.
Hope that helps
Chris
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Select / update a tree node via UmbClientMgr / ClientTools ?
Hi,
In a custom tree, after editing the name of a node and then saving, I'd like to be able to refesh the tree to reflect this change. I've tried:
and that works, but the visually slected node in the tree then moves to the tree root. Is there a way of just refeshing the current node ?
TIA,
Hendy
Hi Hendy,
I think this might be the way:
((BasePage)Page).ClientTools.SyncTree("path", true);
Just testing on my Umbraco custom section but having trouble working out what I need for path part in a custom section.
UPDATE:
This does work you have to specify the path using something like:
"-1,1,1" etc - depending how many levels deep your tree is.
In my custom sections tree I used:
((BasePage)Page).ClientTools.SyncTree("-1," + PropertyId + "," + SpaceId, true);
I found this which helped show how it works underneath:
http://www.java2s.com/Open-Source/CSharp/Content-Management-Systems-CMS/umbraco/umbraco/BasePages/ClientTools.cs.htm
Then looked at Generated source to see what jTree was outputting in my scenario.
Each "li" has Id which is what I think corresponds to the path you build above.
Hope that helps
Chris
is working on a reply...