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

RadFileExplorer opening .pptx files expected behaviour?

2 Answers 51 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Rach
Top achievements
Rank 1
Rach asked on 18 Jul 2013, 02:33 PM
Hi

I have a radFileExplorer control which displays documents within a sharepoint document library.
Users have been complaining that when they open MS PowerPoint (.pptx) files through the radFileExplorer an empty popup window also opens.
Is this known behaviour and is there anything I can do to stop it?

Thanks

2 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 23 Jul 2013, 11:11 AM
Hello Rach,

You can overcome this empty window by cancelling the OnClientFileOpen event arguments. A sample implementation of the desired behavior could be:
<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" OnClientFileOpen="OnClientFileOpen">
    <Configuration ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
</telerik:RadFileExplorer>
<script type="text/javascript">
    function OnClientFileOpen(explorer, args) {
        var fileExt = args.get_item().get_extension();
 
        if (fileExt.toLowerCase() == "ppt" || fileExt.toLowerCase() == "pptx") {
            args.set_cancel(true);
            window.open(args.get_item().get_path());
        }
    }
</script>

I hope this would be helpful.

Regards,
Veselina Raykova
Telerik
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 the blog feed now.
0
Rach
Top achievements
Rank 1
answered on 23 Jul 2013, 01:04 PM
Perfect!

Many thanks
Rach
Tags
FileExplorer
Asked by
Rach
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Rach
Top achievements
Rank 1
Share this question
or