This is a migrated thread and some comments may be shown as answers.
Editor in CompositeControl
2 Answers 12 Views
This is a migrated thread and some comments may be shown as answers.
ric c
Top achievements
Rank 1
ric c asked on 10 Mar 2011, 05:37 PM
Hi, I'm trying to create a compositeControl that contains a RadEditor:

public class TextEditorRad : CompositeControl
    {
        public TextEditorRad()
        {
          
  
protected override void OnInit(EventArgs e)
        {
            CreateChildControls();
            base.OnInit(e);
        }
  
        #region CreateChildControls
        protected override void CreateChildControls()
        {
            Controls.Clear();
            editor = new RadEditor();
            editor.ID = "edEdit";
  
            //DoControl();
            this.Controls.Add(editor);
              
        }
        #endregion
        #region RecreateChildControls
        protected override void RecreateChildControls()
        {
            EnsureChildControls();
        }
        #endregion
        #region Render
        protected override void Render(HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            editor.RenderControl(writer);            
        }
        #endregion
}

When I drag this from my tool box on to an aspx and view the page, The editor is visible but I cannot select the text area and I get the following error showing in FF error console:
Error: a is undefined
Source File: http://localhost/myapp/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.309.20%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af0c88abc-2e1c-4c5d-ab67-8dc4eeeb22f8%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3a1e771326%3ae524c98b%3a874f8ea2%3adc7e0bd%3a1569bb5f%3a63b115ed%3a1c565fc%3a30f1f089%3a19620875%3a33108d14
Line: 6

Any ideas?

Thanks

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Mar 2011, 01:41 PM
Hi,

I tried to reproduce the problem using the provided code but without success.

For your convenience I have attached my test project and video demonstrating my test. You can see the video at: http://screencast.com/t/hJi12gjOC.

Am I missing something? Are you able to reproduce the problem with the provided example?

Kind regards,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
ric c
Top achievements
Rank 1
answered on 14 Oct 2011, 02:37 PM
sorry for the very late reply on this! Yes your example works 100%.I've rewritten my compositeControl using your code as a base and it now works great. Thanks for the great help!
Asked by
ric c
Top achievements
Rank 1
Answers by
Rumen
Telerik team
ric c
Top achievements
Rank 1
Share this question
or