Customizing RadFileExplorer when using RadDialogOpener

2 posts, 0 answers
  1. John
    John avatar
    16 posts
    Member since:
    Sep 2011

    Posted 09 Sep 2014 Link to this post

    We are using the RadDialogopener for image searches on the site. Having good luck with a customized ImageManager.ascx and code like the following. Added a number of display:none css classes to various portions of the replaced ascx to hide functionality we don't need.
    imageManagerParameters = New FileManagerDialogParameters()
    imageManagerParameters.ViewPaths = New String() {"~/userimages/fphimages"}
    imageManagerParameters.UploadPaths = New String() {"~/userimages/fphimages"}
    imageManagerParameters.MaxUploadFileSize = 800000
    izmageManagerParameters.AllowMultipleSelection = False
    Dim imageManager = New DialogDefinition(GetType(ImageManagerDialog), imageManagerParameters)
    imageManager.ClientCallbackFunction = "fphScript.imageManagerHandler"
    imageManager.Width = Unit.Pixel(780)
    imageManager.Height = Unit.Pixel(500)
    imageManager.Parameters("ExternalDialogsPath") = "~/EditorDialogsFPH/"

    dialogOpener.DialogDefinitions.Add("ImageManager", imageManager)

    However, we would also like to customize the RadFileExplorer portion of the dialog. Would like to customize image sizes larger than 32x32.  Would like to filter image searches in the thumbnail grid.  I've found a number of examples where a RadFileExplorer was included in the page source, and after finding the control on the page, they were able to modify its properties using code like...

    Dim rfe = FindRadFileExplorer(Me.Page)
    If Not rfe Is Nothing Then
         rfe.DisplayUpFolderItem = False
         rfe.EnableFilterTextBox = True
         rfe.EnableFilteringOnEnterPressed = True
    End If

    But since we are using RadDialogOpener outside of a RadEditor, and we have no RadFileExplorer in our markup as seen below. And so can't find the RadFileExplorer on the page as in code above.

    <telerik:RadDialogOpener runat="server" ID="luImageDialogOpener"></telerik:RadDialogOpener>

    How can I access the RadFileOpener used by this dialog in order to set properties like "EnableFilterTextBox"?    
  2. Ianko
    Ianko avatar
    1738 posts

    Posted 10 Sep 2014 Link to this post

    Hello John,

    The described approach to reconfigure the RadFileExplorer of the File Browser dialogs is explained in details in this Code Library

    You will need to customize the built-in File Browser dialog of the RadEditor and add a custom User Control with which to handle the code behind. 


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top