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

Show content In grid Accodring to TreeView Data

1 Answer 43 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Neha
Top achievements
Rank 1
Neha asked on 11 Mar 2014, 11:09 AM
There is a RadFileExplorer control in my application. When I select the folder from the treeview suppose I select the child node then the data which is in child Node is get into the grid and suppose the close the rad file explorer the open again then I want that I child node which I selected prevoiusly is selected shown in the rad file explorer and also the data related to the child node  is shown in the grid

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Mar 2014, 03:54 PM
Hello Neha,

You can take the path to the currently open folder in the handler of the FileExplorer's ClientFolderChange event in a similar way:
<telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" OnClientFolderChange="OnClientFolderChange">
</telerik:RadFileExplorer>
<script>
    function OnClientFolderChange(explorer, args) {
        var path = args.get_path();
    }
</script>

Once you have the path to the desired folder collected you can keep it in a hidden field (for example) and then set it as a value of the FileExplorer's IntitialPath property when the FileExplorer will be opened again. Note that the latest moment of the page cycle where this property can be configured is the Page_Load event:
protected void Page_Load(object sender, EventArgs e)
{
    var folderPath = ""; //your logic for accessing the value here
    RadFileExplorer1.InitialPath = folderPath;
}

I hope this helps.

Regards,
Vessy
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
FileExplorer
Asked by
Neha
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or