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

Output data to page when a folder is loaded

1 Answer 36 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 15 Oct 2010, 03:00 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 20 Oct 2010, 10:29 AM
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
Tags
FileExplorer
Asked by
Andreas
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or