Access Radeditor within user control from another user control

4 posts, 0 answers
  1. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 03 Nov 2010 Link to this post

    Hi.  How would I access the Radeditor from within a user control?  
    I have a user control (details.ascx) that has a user control embedded in it (editor.ascx) 
    that only contains a radeditor control.  so, from within the details.ascx javascript code,
    I want to be able to access the radedit control inside the editor.ascx.  I couldn't get a
    reference to the radedit.  previously I had the editor.ascx replaced with just an RadTextBox
    and it worked perfectly.    but, I just tried the user control yesterday, and I cannot find
    a way to access the radeditor.  In the details.ascx page_load on serverside, I set a hidden
    field to the usercontrol's radeditor ID, but that doesn't seem to work as in client side, I
    get a not defined error. 

    (also, this is all within a content page within a masterpage scenario (which didn't seem to
    affect anything.) And, all the examples on the forums are just too simplistic as it is
    accessing the radeditor from within an aspx page, not an ascx page.

    My code sample below:  (from details.ascx)

    function OnSearchClose(oWnd, args) {
    //get the transferred arguments
    var arg = args.get_argument();
    if (arg) {
    var ClauseName = arg.ClauseName;
    var txtName = $find("<%= rtbClauseName.ClientID %>");
                           //the above code works perfectly as it is just accessing
                            // a radtextbox within details.ascx


    //This code above is accessing the hiddenfield on the page, but just returns
    //null, so I'm not sure how to get a reference to the radeditor on the usercontrol

  2. Chris @ Intrinsic
    Chris @ Intrinsic avatar
    98 posts
    Member since:
    Oct 2010

    Posted 03 Nov 2010 Link to this post

    Solved my own issue.

    simply set ClientIdMode = "Static"  in my radeditor control, and
    was able to find the control by using $find("RadEditor1");

    Strange, there was no mention of this in any of the telerik support documentation or even any google search!

  3. Ian
    Ian avatar
    2 posts
    Member since:
    Feb 2011

    Posted 14 Feb 2011 Link to this post

    I too am having problems with the radeditor, also in a user control.

    but mainly with the dialog manager not working. i can access the content of the editor in the codebehind, but the dialog manager opens with a 'web.config error' .

    My post: My Post

    I dont know what to do.


  4. Rumen
    Rumen avatar
    13980 posts

    Posted 17 Feb 2011 Link to this post

    Hello Ian,

    Please, try the suggestions and especially point 4 in the following KB article: Error: Web.config registration missing! The Telerik dialogs require a HttpHandler registration in the web.config file.

    Best regards,
    the Telerik team
Back to Top