This is a migrated thread and some comments may be shown as answers.

Custom Nodes in File Explorer

1 Answer 37 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 17 Aug 2015, 05:09 PM

I am currently attempting to add custom nodes to the file explorer view, with the selection of the lowest level of each node displaying the contents of multiple listed directories (create nodes with custom names as their own 'custom trees' where the contents of the corresponding listview would include those of directory1 + 2 + 3 etc.) Here is what I have so far, and I am looking for the equivalent value of the 'viewpath' from the main fileexplorer object for each individual node. 

protected void BindDataTable()
    {
        RadTreeNode temp_node;
        DataTable node_template = CreateDirectoryTable();

        foreach (DataRow row in node_template.Rows)
        {
            temp_node = new RadTreeNode();
            temp_node.Text = (string)row[1];
            temp_node.Value = (string)row[2];

            FileExplorerBase.TreeView.Nodes.Add(temp_node);
        }
    }​

 Is it a simple property in the node object? Because I cannot seem to find it. Or is this functionality present in the treeview object directly?

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 20 Aug 2015, 02:27 PM
Hello Alexander,

I am not quite sure I understand the exact scenario you are trying to achieve. Can you, please, elaborate a bit on the matter?

Basically the only values RadFileExplorer accepts for its ViewPaths are actual virtual paths to folders placed inside the application root directory. Once the control access the passed path it binds the TreeView with the names of the folders located in this path. If you want to achieve different than that scenario (e.g. access the content from a data table) you have to implement a custom content provider so the control will know how to handle the passed data:
Use Custom FileBrowserContentProvider

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
FileExplorer
Asked by
Alexander
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or