How to disable radfileexplorer openfile window?

2 posts, 0 answers
  1. Praveen
    Praveen avatar
    14 posts
    Member since:
    Oct 2011

    Posted 28 Nov 2011 Link to this post

    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
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 30 Nov 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top