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

[Solved] Image Manager - Images not Loading from specified path

9 Answers 380 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bose
Top achievements
Rank 1
Bose asked on 23 Apr 2009, 12:46 PM
Hi

 I have 2 problesm with Image manager when implementing it in my application
I am using stand alone Image manager control without any editor control

1. I am setting all the DialogOpener properties in a class file and trying to use that in all the pages whereever i have my Image Manager but it i am not able to Invoke the ImageManager Javascript function

Below is the code snippet used in seperate class file and invoking the method from Code behind
public class Teleril_Controls
{

 

public static void GetImageManagerProperties(DialogOpener DialogOpener)

 

{

 

try

 

{

 

FileManagerDialogParameters imageManagerParameters = new FileManagerDialogParameters();

 

 

string[] strDocumentPath = new string[1] { <<Image Path>>};

 

imageManagerParameters.ViewPaths = strDocumentPath;

imageManagerParameters.UploadPaths = strDocumentPath;

imageManagerParameters.DeletePaths = strDocumentPath;

imageManagerParameters.MaxUploadFileSize = 5000000;

 

// If you don't set the following property, the default value will be used

 

 

// imageManagerParameters.SearchPatterns = new string[] { "*.jpg" };

 

Telerik.Web.UI.

DialogDefinition imageManager = new Telerik.Web.UI.DialogDefinition(typeof(ImageManagerDialog), imageManagerParameters);

 

imageManager.ClientCallbackFunction =

Telerik_Constants.ImageManagerFunction;

 

imageManager.Width =

Unit.Pixel(694);

 

imageManager.Height =

Unit.Pixel(440);

 

 

//If you need to customize the dialog then register the external dialog files

 

 

//imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";

 

DialogOpener.DialogDefinitions.Add(

Telerik_Constants.ImageManagerFunction, imageManager);

 

}

 

catch (Exception ex)

 

{

}
}
}

Javascript in (.aspx) page

 

<

 

script language="javascript" type="text/javascript">

 

 

 

 

 

 

function ImageManagerFunction(sender, args)

 

{

 

var selectedItem = args.get_value();

 

 

var txt = $get('<%= txt_Image.ClientID %>');

 

 

if ($telerik.isIE)

 

{

txt.value = selectedItem.outerHTML;

//this is the selected IMG tag element

 

 

 

 

 

 

var strPath = args.value.getAttribute("src",2);

 

 

var img = document.getElementById('Image Tag Name');

 

img.src = strPath;

 

var hField = document.getElementById('Hidden Field to store the image');

 

hField.value = strPath;

 

var strImagename=strPath.split("/");

 

 

if(strImagename.length-1!="")

 

txt.value=strImagename[strImagename.length-1];

}

 

else

 

{

 

var path = args.value.getAttribute("src",2);

 

txt.value =

"<img src='" + path + "' />";

 

}

}

 

</script>

 

 

Calling the above method from Code behind file

Telerik_Controls.GetImageManagerProperties(ImgDialogOpener

);
Is  this the right way to Call the DailogOpener properties (or) It can be only be invoked from Code Behind.


2. I am able to open the Image Manager if i have all the properties set in code behind file without calling it from common class file but if the image folder is huge with 1000 or 2000 images it is not trying to Load the images, I am not sure if that is  because of the image folder size (or) because of the path specified.
But i am able to access the image manager when i specify a folder with 15 or 20 images

Your earliest help and suggestions are appreciated.

Regards,
Bose Thirumalai


 

9 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 27 Apr 2009, 02:30 PM
Hi Bose,

1. Yes, using code-behind is the right way to configure the dialog opener. We plan in the future to provide declarative support as well.

2. The RadFileExplorer can work well with folders containing no more than couple of hundred files (e.g. 300 hundred).  We were already contacted by a number of people who faced the same problem as you, and have extended the RadFileExplorer to proide paging for folders with more files. The functionality is already implemented in the internal/inhouse version and will be available as a public Internal Build within a couple of days. By default the AllowPaging property or RadFileExplorer is set to false, but in the RadEditor dialogs it has been set to true.

Best regards,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bose
Top achievements
Rank 1
answered on 16 May 2009, 01:23 PM

Hi

   I have already send query for the Dialog Opener.
   I have got reply telling that the Dailog Opener & FileExplorer is ready in the inhouse version.

   Where can i download the latest version with Hot fixes?

Regards
Bose Thirumalai

0
Rumen
Telerik team
answered on 19 May 2009, 05:42 AM
Hi Bose,

You can download the latest internal build of RadControls for ASP.NET AJAX from the following link: http://www.telerik.com/account/downloads/internal-builds.aspx. The currently available latest build is Telerik.Web.UI_2009_1_514_trial_hotfix.zip.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bose
Top achievements
Rank 1
answered on 19 May 2009, 03:22 PM
Hi

  Thanks for your update on the Hot Fixes.
   I have downloaded the Latest version of Hot fixes which is provided through the Link.
   Can you please help me in testing the Hot Fixes? Because currently i have an existing version of telerik installed in my machine.
   How am i supposed to test this?Do i need to create a seperate project and put all the files in that project
   I need to test the editor control to make sure all the images are loading in image manager, because as per my previouse thread i was running into a problem where i was not able to display more then 400 images in my image manager.
Earliest reply is appreciated.

Regards
Bose Thirumalai
0
Rumen
Telerik team
answered on 22 May 2009, 10:23 AM
Hello Bose,

You can backup your current project and only update the Telerik.Web.UI.dll in the bin folder of your project with the new one from the hotfix zip installation. You should make sure also that the http Telerik.Web.UI handlers in the web.config file are set without fully qualified names.

For more detailed information see the following help article: Upgrading RadControls Trial to RadControls Developer license.

Of course, another approach is to create another web project, copy the aspx/ascx files from the other project and put the new Telerik.Web.UI.dll in its bin folder.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bose
Top achievements
Rank 1
answered on 04 Jun 2009, 09:16 PM
Hi

  I tried to create a new project and add the Hot fixe files to that project but still i am not able to Load all the images in my Image Manager as well as the RAD File Explorer also is not showing up with all the images.
But internally i can see that there is some changes to the user control like enable paging = true  which i downloaded from Telerik.
Can you suggest me some solution is there any other approach to use this Image manager (or) File Explorer?
I have about 1000 images in my project folder, so i was to display all the images in the Image Manager with the ViewFilePath properties.
What are the other options to get the Image manager work with the current Hot fixes.

Regards
Bose Thirumalai
0
Lini
Telerik team
answered on 08 Jun 2009, 08:36 AM
Hello Bose,

We have released an official service pack for the RadControls for ASP.NET AJAX a couple of weeks ago (2009.1.527). It features the paging feature of the file explorer in the editor dialogs. If you do not wish to work with a hotfix (internal) build, you can download the official service pack and install it. If you still have problems with the new release, please send us a couple of screenshots that show them and we will do our best to help you.

Kind regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bose
Top achievements
Rank 1
answered on 19 Jun 2009, 04:38 PM
Hi

  Thanks for the update.
  Now the Image manager is able to display any number of  images with help of pagination.
  But the only problem i am facing is I am not able to Declare the  FileManagerDialogParameters in common class file so that i can use that globally across my application.
Can you please suggest if there is any possible way to call the Image manager with the help of button click.
Because i remember the previous version of Radeditor has that property to open the Image manger (editor.Fire) but do have any such function in the recent release, If so please suggest me some solution to achieve that functionality through Javascript because i dont want to write the same code in soo many pages.
I want to know if it is possible to have the properties for the Standalone Image manager in common class and call the same across all the pages where ever i am using the Image Manager??
Earliest reply is appreciated.

Regards
Bose Thirumalai
0
Lini
Telerik team
answered on 22 Jun 2009, 11:14 AM
Hi Bose,

If you want to open the Image manager dialog of an existing editor, you can use the editor.fire("ImageManager") JavaScript call. The only change from the previous version is that "Fire" is now lowercase "fire".

It is also possible to use the Image Manager dialog standalone - i.e. without an editor on the page. We have a KB article, which shows how to do this: http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx. I can see that you are already using this approach from the code that you have pasted in your first message.

Kind regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Bose
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Bose
Top achievements
Rank 1
Rumen
Telerik team
Lini
Telerik team
Share this question
or