Passing parameter to FileBrowserContentProvider

2 posts, 0 answers
  1. Koren
    Koren avatar
    20 posts
    Member since:
    Aug 2010

    Posted 13 Oct 2010 Link to this post

    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.
  2. Fiko
    Fiko avatar
    1406 posts

    Posted 18 Oct 2010 Link to this post

    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.

    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
Back to Top