Output data to page when a folder is loaded

2 posts, 1 answers
  1. Andreas
    Andreas avatar
    12 posts
    Member since:
    Aug 2010

    Posted 15 Oct 2010 Link to this post

    Hi,

    When I click a folder in the tree, it is loaded (the folder gets populated with children). 

    When this happens, I want to output extra meta information about these children to the page.

     

    (The children that are loaded when a folder is selected are lazy loaded (or loaded on demand, if you will) from a database (I use a custom content provider)).

     

    I've tried using the server side FileExplorer.Load event, since I've noticed that that is called every time a folder is clicked in the tree. However, the text for "testLabel" isn't updated:

     

    Page_Load()

    {

        fileExplorer.Load += fileExplorer_Load;

    }

    void fileExplorer_Load(object sender, EventArgs e)

    {

            testLabel.Text = "my new metadata  for the newly loaded children"

    }

    Is it possible to accomplish what I'm trying to do?

    Regards,

    Andreas

  2. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 Oct 2010 Link to this post

    Hello Andreas,

    The behavior that your experience is the expected one because the RadFileExplorer uses AJAX requests and Callback in order to update its content. The Label in your case, however, is out of the updated region and this is why it is not updated. In your case I recommend you to wrap the Label in a RadAjaxPanel control and use its AjaxRequest event in order to update the label. You can call this event client-side using ajaxRequest method. You need to call it in the RadFileExplorer's OnClientFolderLoaded client-side event.
    For your convenience I have attached a demo to this thread.

    Sincerely yours,
    Fiko
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top