Hello everybody,
I am very novice in ASP.NET and telerik and i want to know if it's possible to have a big windows when i click on pdf files in radfileexplorer. (because now window are very small when i open files)
How can I do this ?
I work in asp.net C# and i just use for the moment :
<telerik:Rafileexplorer ID="RadFileEplorer1" Runat="server" width="100%">
</telerik:Rafileexplorer >
thx
Sorry for my bad english but i'm french ...
I am very novice in ASP.NET and telerik and i want to know if it's possible to have a big windows when i click on pdf files in radfileexplorer. (because now window are very small when i open files)
How can I do this ?
I work in asp.net C# and i just use for the moment :
<telerik:Rafileexplorer ID="RadFileEplorer1" Runat="server" width="100%">
</telerik:Rafileexplorer >
thx
Sorry for my bad english but i'm french ...
5 Answers, 1 is accepted
0
Hi,
Please find a complete tutorial on how to modify the behavior of the default dialogs of RadFileExplorer in the following KB article:
Change the behaviors of the embedded dialogs
Also, if you want to disable the RadWindow popups and open the files using default browser windows you can use the following sample code:
I hope this helps
Sincerely yours,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please find a complete tutorial on how to modify the behavior of the default dialogs of RadFileExplorer in the following KB article:
Change the behaviors of the embedded dialogs
Also, if you want to disable the RadWindow popups and open the files using default browser windows you can use the following sample code:
<telerik:RadFileExplorer ID=
"RadFileExplorer1"
runat=
"server"
OnClientFileOpen=
"OnClientFileOpen"
>
</telerik:RadFileExplorer>
<script type=
"text/javascript"
>
function
OnClientFileOpen(oExplorer, args)
{
//get the extension of the opened item
var
fileExt = args.get_item().get_extension();
if
(fileExt && fileExt.toLowerCase() ==
"pdf"
)
{
//cancel the default behavior
args.set_cancel(
true
);
//open new RadWindow
var
oWnd = radopen(args.get_item().get_path(),
"RadWindow1"
);
//set size to the newly opened RadWindow
oWnd.setSize(600, 400);
//if you want to open the PDF file in a new browser window
//you can use the following code
//window.open(args.get_item().get_path());
}
}
</script>
I hope this helps
Sincerely yours,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0

David
Top achievements
Rank 1
answered on 05 Jul 2010, 01:52 PM
Thanks, It helped me a lot.
0

Marc
Top achievements
Rank 1
answered on 16 Jul 2010, 06:51 PM
I have just implemented your suggestion posted here with the JS. While it works fine in Chrome, in IE8 the RadWindow opens with the PDF, then a new IE window opens with the PDF but then focus is taken back to the window with the RadWindow in it. The user then must click back to the IE window with the PDF.
All I want is to not use the RadWindow at all for opening files from the FileExplorer. Your solution is close, but not ideal in IE.
All I want is to not use the RadWindow at all for opening files from the FileExplorer. Your solution is close, but not ideal in IE.
0
Hello Marc,
In case that you don't want to use the RadWindow control, you can check whether the current file is directory or not, and use the window.open method to open the current file. E.g.
ASPX:
Hope this helps.
Sincerely yours,
Petio Petkov
the Telerik team
In case that you don't want to use the RadWindow control, you can check whether the current file is directory or not, and use the window.open method to open the current file. E.g.
ASPX:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
div
>
<
telerik:RadFileExplorer
ID
=
"RadFileExplorer1"
runat
=
"server"
OnClientFileOpen
=
"OnClientFileOpen"
>
<
Configuration
ViewPaths
=
"~/Files"
/>
</
telerik:RadFileExplorer
>
<
script
type
=
"text/javascript"
>
function OnClientFileOpen(oExplorer, args)
{
var isDirectory = args.get_item().isDirectory();
if (!isDirectory)
{
//cancel the default behavior - RadWindow will not show
args.set_cancel(true);
var itemPath = args.get_item().get_path();
//if you want to open the PDF file in a new browser window
//you can use the following code
window.open(itemPath);
}
}
</
script
>
</
div
>
</
form
>
</
body
>
</
html
>
Sincerely yours,
Petio Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Marc
Top achievements
Rank 1
answered on 02 Aug 2010, 07:13 PM
That worked, thanks!