Radeditor inside grid inside raddataform

2 posts, 0 answers
  1. VikingCoder
    VikingCoder avatar
    3 posts
    Member since:
    Jan 2007

    Posted 29 Oct Link to this post

    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#)?

     

  2. Rumen
    Admin
    Rumen avatar
    13261 posts

    Posted 30 Oct Link to this post

    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.
Back to Top