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

RadEditor as image picker.

8 Answers 334 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lautaro
Top achievements
Rank 1
Lautaro asked on 15 Jun 2010, 10:45 AM
Hi!

I have an application where the user can create an article with one image chosen as the repsenting image of the article. The main image is shown as a thumbnail when all articles are listed. However the article can contain any ammount of images. 

So the user ahs to choce one image from the uploaded folder as the main image. Can i use an editor for that? I mean just the imageManager of the editor. Maybe i there is a better control?

Thank you!
Lautaro Arino.

8 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Jun 2010, 11:05 AM
Hi Lautaro ,

If you want to use the Image Manager as a standalone control, please, see this KB article:
Using the Image and Document managers outside RadEditor.

Kind regards,
Rumen
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
Lautaro
Top achievements
Rank 1
answered on 15 Jun 2010, 11:11 AM
Thanks for the lightnhing fat reply!!! :D
Makes me very happy.


Thats alot of code!
Im not very good with JavaScript so i try to stay away from copy pasting this kind of solutions if possible. But there is no other image manager/documentManager in the RadToolbox is there?

Another question:
Can i use this solution to have the user select ONE image and then store it when the user presses ok. I dont want it inserted in the editor, i just want the user to pick one image.

Thank you!
0
Rumen
Telerik team
answered on 15 Jun 2010, 02:38 PM
Hello Lautaro,

I think that the File Selector Dialog example is exactly what you are looking for and will do the job.

The example shows how to create a simple File Selector Dialog. On Open button click a RadWindow containing a RadFileExplorer control is displayed. Once the user browses to a file and double clicks on it, a callback command is executed and the selected file path is populated in the textbox.

You can get the returned by the RadWindow dialog value and save it in your database and after that populate it in the article.




Sincerely yours,
Rumen
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
Lautaro
Top achievements
Rank 1
answered on 15 Jun 2010, 10:42 PM
Sounds perfect except for one detail. I would also need the possibility for the user to upload new images in the same dialog, as you can with the RadEditor. Any suggestions?

Thanks! Lautaro.
0
Rumen
Telerik team
answered on 16 Jun 2010, 08:51 AM
Hello Lautaro,

To enable the Upload feature of RadFileExplorer control you should set the UploadPaths property in the Configuration inner tag, e.g.

<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="530" Height="500"
        OnClientFileOpen="OnClientGridDblClick">
        <Configuration ViewPaths="~/FileExplorer/Examples/Default/Images" UploadPaths="~/FileExplorer/Examples/Default/Images" />
    </telerik:RadFileExplorer>


The UploadPaths property is not set in this live demo, but you can set it manually in the RadFileExplorer declaration in your project.

All the best,
Rumen
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
Lautaro
Top achievements
Rank 1
answered on 16 Jun 2010, 10:48 AM
Thats it!
Now i have everything i need. Thank you!
0
Lautaro
Top achievements
Rank 1
answered on 18 Jun 2010, 09:15 AM
Is it possible to make an image preview with codebehind?
I dont know why but when i try to make a event handler in codebehind i get "type or namespace FileExplorer could not be found"  even when im using 
"
using Telerik.Web.UI.FileExplorer;
using Telerik.Web.UI; 
"

i also try to make my eventhandler like this
"    protected void OnClientItemSelected(object sender, EventArgs e)
    {
        Telerik.Web.UI.FileExplorer xplorer = sender as Telerik.Web.UI.FileExplorer;
    }
"

but it doesnt work either. It doesnt recognize FileExplorer as a type.
Im still not using a registered version. 

0
Rumen
Telerik team
answered on 21 Jun 2010, 09:09 AM
Hello Lautaro,

The RadFileExplorer control does not offer out-of-the box an Image Previewer. Nevertheless, if the EnableOpenFile property is set to true, then you can preview an image in the FileBrowser, by double click on it in the grid.


Best regards,
Rumen
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
Tags
Editor
Asked by
Lautaro
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Lautaro
Top achievements
Rank 1
Share this question
or