If I have for example:
How do I make the image manager automatically default to the
There are many subfolders and I would like that when the image manager opens, it pre-selects the folder which the user can upload into.
Is that possible?
My scenario is that the users have read-only access to all images, but can only upload/delete in the current month, so it would be good to pre-select that month.
RadEditor1.ImageManager.ViewPaths =
new
string
[] {
"~/images"
};
RadEditor1.ImageManager.UploadPaths =
new
string
[] {
"~/images/2011/06"
};
RadEditor1.ImageManager.DeletePaths =
new
string
[] {
"~/images/2011/06"
};
"~/images/2011/06"
subfolder when it is opened? It seems to default to displaying the root ViewPaths folder every time, so the user has to each time drill down to the subfolder for every image to be uploaded or inserted.There are many subfolders and I would like that when the image manager opens, it pre-selects the folder which the user can upload into.
Is that possible?
My scenario is that the users have read-only access to all images, but can only upload/delete in the current month, so it would be good to pre-select that month.
6 Answers, 1 is accepted
0
Jon
Top achievements
Rank 1
answered on 01 Jul 2011, 12:09 PM
Just to add to my question. What I would like is a solution like the
Is there a way to have equivalent functionality in the RadEditor ImageManager? Perhaps a way to go to an initial folder with javascript?
A way to set the InitialPath in the code behind of the page hosting the RadEditor would be best.
InitialPath
property of RadFileExplorer.Is there a way to have equivalent functionality in the RadEditor ImageManager? Perhaps a way to go to an initial folder with javascript?
A way to set the InitialPath in the code behind of the page hosting the RadEditor would be best.
0
Hello Jon,
You can try the solution provided in the following KB article: Select an image or a folder when ImageManager is first shown.
Greetings,
Rumen
the Telerik team
You can try the solution provided in the following KB article: Select an image or a folder when ImageManager is first shown.
Greetings,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jon
Top achievements
Rank 1
answered on 07 Jul 2011, 10:34 PM
Hello Rumen,
I had seen a similar, but not identical, solution elsewhere but was hoping to avoid the proliferation of files in this solution.
This solution also does not allow a different InitialPath for the ImageManager and DocumentManager.
I have got around this limitation by putting these values into session state and reading them in the customised editor dialog user controls, which is not ideal but seems to work.
Jon
I had seen a similar, but not identical, solution elsewhere but was hoping to avoid the proliferation of files in this solution.
This solution also does not allow a different InitialPath for the ImageManager and DocumentManager.
I have got around this limitation by putting these values into session state and reading them in the customised editor dialog user controls, which is not ideal but seems to work.
Jon
0
neowebgr
Top achievements
Rank 2
answered on 05 Dec 2012, 12:24 PM
Hello Rumen,
I am trying to do the same thing that Jon describes and I tried the sample code from this article.
Unfortunately, I couldn't make it run successfully. Instead of opening into a sub folder "~/Root/SekectedImage" it always opens to the root folder "~/Roots/".
I tried this in an empty Web Forms Application (.NET 3.5 SP1) with the 2012.2.912.35 version.
Here is my default.aspx file
and here is my default.aspx.vb file
Do you have any idea why this isn't working?
Thank you
I am trying to do the same thing that Jon describes and I tried the sample code from this article.
Unfortunately, I couldn't make it run successfully. Instead of opening into a sub folder "~/Root/SekectedImage" it always opens to the root folder "~/Roots/".
I tried this in an empty Web Forms Application (.NET 3.5 SP1) with the 2012.2.912.35 version.
Here is my default.aspx file
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
div
>
<
telerik:RadEditor
ID
=
"RadEditor1"
runat
=
"server"
>
</
telerik:RadEditor
>
</
div
>
</
form
>
</
body
>
and here is my default.aspx.vb file
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
RadEditor1.ImageManager.ViewPaths = {
"~/UsersFiles"
}
If
(
Not
Page.IsPostBack())
Then
Dim
initialPath
As
String
= RadEditor1.DialogHandlerUrl +
"?initialPath="
+ HttpContext.Current.Request.ApplicationPath +
"/UsersFiles/admin/images/"
RadEditor1.DialogHandlerUrl = initialPath
End
If
End
Sub
Do you have any idea why this isn't working?
Thank you
0
Hi,
You should replace the
This change should help you.
Regards,
Rumen
the Telerik team
You should replace the
?initialPath
with ?PreselectedItemUrlThis change should help you.
Regards,
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.
0
neowebgr
Top achievements
Rank 2
answered on 12 Dec 2012, 10:44 AM
Indeed, with this change it worked!
Thank you Rumen
Thank you Rumen