Refresh RadFileExplorer

2 posts, 0 answers
  1. Miquel Frances Sitja
    Miquel Frances Sitja avatar
    4 posts
    Member since:
    Mar 2010

    Posted 23 Mar 2010 Link to this post

    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.

  2. Miquel Frances Sitja
    Miquel Frances Sitja avatar
    4 posts
    Member since:
    Mar 2010

    Posted 23 Mar 2010 Link to this post

    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');

     

    }




  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top