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

Passing parameter to FileBrowserContentProvider

1 Answer 89 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Koren
Top achievements
Rank 1
Koren asked on 13 Oct 2010, 11:55 AM
I have implemented a custom FileBrowserContentProvider which is used with RadEditor. I am searching for a way to pass a parameter to the custom FileBrowserContentProvider during its creation. It can be through the constructor or another way but it must be passed on creation of the object. Is it possible?
If not, is there another way that the dialogs and the file browser could query for this parameter? I was able to pass it with querying the content Request url referrer but when the dialogs were opened, the referrer changed and the parameter was no longer present.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 18 Oct 2010, 10:18 AM
Hi Koren,

The FileBrowserContentProvider is initiated using reflection internally in the RadFileExplorer control, so it is not possible to pass external parameters to the constructor. In your case I recommend you to use a Session variable in order to pass parameters to the provider. Alternatively, you could use the approach described in this KB article. For your convenience I have attached a demo which shows how to access values entered in two TextBoxes from the code of the provider.

Greetings,
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
Editor
Asked by
Koren
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or