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

Radeditor inside grid inside raddataform

1 Answer 75 Views
Editor
This is a migrated thread and some comments may be shown as answers.
VikingCoder
Top achievements
Rank 1
VikingCoder asked on 29 Oct 2017, 09:10 PM

I have a radeditor inside a radgrid inside a raddataform. How do I set the image upload path for the radeditor programatically in code-behind (C#)?

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 Oct 2017, 09:41 AM
Hi,

You have to get a reference to RadEditor and after that use the following syntax:
string[] viewImages = new string[] { "~/Images" };
string[] uploadImages = new string[] { "~/Images/New" };
string[] deleteImages = new string[] { "~/Images/New/Articles", "~/Images/New/News" };
 
if (!IsPostBack)
{
    RadEditor1.ImageManager.ViewPaths = viewImages;
    RadEditor1.ImageManager.UploadPaths = uploadImages;
    RadEditor1.ImageManager.DeletePaths = deleteImages;
    //to change the View mode to Grid use the below syntax
    RadEditor1.ImageManager.ViewMode = Telerik.Web.UI.Editor.DialogControls.ImageManagerViewMode.Grid;
}


You can find more details in the following resources:

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/dialogs/file-browser-dialogs/images

https://www.telerik.com/forums/get-radeditor-content-inside-the-radgrid

Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
VikingCoder
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or