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

Refresh RadFileExplorer

1 Answer 242 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Miquel Frances Sitja
Top achievements
Rank 1
Miquel Frances Sitja asked on 23 Mar 2010, 02:41 PM
Hello

I'm trying to simulate the click on the folder on a RadFileExplorer, i can find the node and select it (the value is passed from a combo box), on SelectedIndexChaged, but i cannot find the way to reload the content of the RadFileExplorer from javascript, there is any way to do this?

my javascript code is:

function

 

onSelectedIndexChanged(sender, eventArgs)

 

{

 

var item = eventArgs.get_item();

 

 

var oExplorer = $find("<%=RadFileExplorer1.ClientID%>");

 

 

var oTree = oExplorer.get_tree();

 

 

if (oTree.findNodeByText(sender.get_value()))

 

{

 

var selectedNode = oTree.findNodeByText(sender.get_value());

 

selectedNode.select();

// Here i want to simulate the node click event...
}

 

else

 

alert(

'Folder not found');

 

}

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Miquel Frances Sitja
Top achievements
Rank 1
answered on 23 Mar 2010, 03:05 PM
Hi There, i found the solution:

Only for information, using the information on this post: 176973_radfileexplorer-q12009

The way to do this is previously setting the current directory to refresh...

The final code is the following:

function

 

onSelectedIndexChanged(sender, eventArgs)

 

{

 

    var item = eventArgs.get_item();

 

 

    var oExplorer = $find("<%=RadFileExplorer1.ClientID%>");

 

 

    var oTree = oExplorer.get_tree();

 

 

    if (oTree.findNodeByText(sender.get_value()))

 

    {

 

        oExplorer.set_currentDirectory("CMS/"+sender.get_value());

 

        oExplorer.refresh();

    }

 

    else

 

        alert(

'Folder not found');

 

}




Tags
FileExplorer
Asked by
Miquel Frances Sitja
Top achievements
Rank 1
Answers by
Miquel Frances Sitja
Top achievements
Rank 1
Share this question
or