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

How to disable radfileexplorer openfile window?

1 Answer 134 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 29 Nov 2011, 05:26 AM
Hi,

I need to prevent open window for files in radfileexplorer.Instead of these I am using save process in "Open" menu option.
Please send me exact code to disable open file window without remove open option in context menu.

Regards,
Praveen

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 30 Nov 2011, 02:14 PM
Hi Praveen,

You can prevent the display of the "Preview" dialog of RadFileExplorer by handling its OnClientFileOpen event, e.g.:
<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" OnClientFileOpen="explorerFileOpen">
    <Configuration ViewPaths="~/ROOT" />
</telerik:RadFileExplorer>
 
<script type="text/javascript">
    function explorerFileOpen(explorer, args)
    {
        var item = args.get_item();
        if (!item.isDirectory() && item.get_extension() == "jpg")
            args.set_cancel(true);
    }
</script>


Regards,
Dobromir
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
FileExplorer
Asked by
Praveen
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or