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

Image Manager w/o Insert

3 Answers 37 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 04 Mar 2011, 05:25 PM
I am using a custom dialog to implement the ImageManager as a standalone file manager for images (outside of RadEditor). I have hidden both the "Insert" button of the FileBrowser UserControl and the "Properties" tab of the ImageManager UserControl. However, if a user double clicks on an image, it still assuems they are trying to insert the image in some content and this results in the ImageManager dialog closing. Is there a way to disable the double click for files within the FileBrowser control in my custom dialogs?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Mar 2011, 02:43 PM
Hi Albert,

You can use the OnClientFileOpen event of RadFileExplorer to cancel the file insertion in the content area:

<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="450" EnableCopy="true"
    OnClientFileOpen="OnClientFileOpen">
    <Configuration ViewPaths="~/Images" />
</telerik:RadFileExplorer>
<script type="text/javascript">
    function OnClientFileOpen(sender, args) {
        if (!sender.get_selectedItem().isDirectory()) {
            args.set_cancel(true);
        }
    }
</script>

The FileExplorer is available in the FileBrowser.ascx file.

Regards,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Karlo
Top achievements
Rank 1
answered on 01 Aug 2012, 03:04 AM
in 2012 Q2 SP1, the rad dialog still closes even if I cancel the OnClientFileOpen

any work arounds?
0
Rumen
Telerik team
answered on 03 Aug 2012, 06:09 AM
Hi,

Yes, this is the default behavior of the File Browser dialogs of RadEditor and we do not plan to disable it. To avoid the dialog closing, you should handle the OnClientFileOpen event as shown in my earlier post.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Rumen
Telerik team
Karlo
Top achievements
Rank 1
Share this question
or