Getting the FullPath of a node is possible client-side (using Javascript) as well. Here is a sample scenario:
You are hooking the BeforeClientClick client-side event handler and you are displaying the full-path of a node in the browser status bar. Consider the code below:
| |
Copy Code |
|
<script type="text/javascript"> function Click(node) { var s = node.Text; var parent = node.Parent; while (parent != null) { s = parent.Text + " > " + s; parent = parent.Parent; } window.status = s; } </script> |
And the declaration:
| |
Copy Code |
|
... <rad:radtreeview runat="server" BeforeClientClick="Click" .... /> ... |
If you have a tree, representing a directory structure the result will be similar to this:
Desktop > My Documents > My Pictures > 10.11.2003