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

RadEditor added to a Server Composite Control

2 Answers 119 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jun
Top achievements
Rank 1
Jun asked on 03 Jan 2011, 08:28 PM

I have successfully added a radeditor control inside a server compositecontrol:

protected override void CreateChildControls() 
  
    Controls.Clear(); 
    _txtBox = new TextBox(); 
    _txtBox.ID = "txtEdit"; 
   _edrBox = new RadEditor();
    _edrBox.ID = "edrEdit";
     
    _txtBox.TextChanged += new EventHandler(txtBox_TextChanged); 
    _edrBox.ValueChanged += new EventHandler(edrBox_ValueChanged); 
    this.Controls.Add(_txtBox); 
    this.Controls.Add(_edrBox); 
  }

But the problem is, when the server control is placed inside a formview and that formview is ajaxified by a radgrid (ie, in a master/detail relationship, clicking a row on the radgrid should refresh the details inside a formview), an Ajax javascript error shows up that a null reference is detected at the time of sys.load????

Attached is the javascript code (from microsoft ajax) showing the error where variable a is NULL.

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Jan 2011, 12:49 PM
Hello Jun,

Unfortunately, we are not aware of this problem and the provided debug information is not enough to find what is causing it.
Can you please isolate the problem in a simple fully runnable project and send it for examination by opening a new support ticket from your account. Once we are able to reproduce the issue on our end, we will debug it and do our best to provide a solution.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jun
Top achievements
Rank 1
answered on 06 Jan 2011, 04:45 PM
Thanks for the response. The purpose of the server compositecontrol I created is to dynamically render a TextBox or RadEditor control on a page. The MicrosoftAjax.js is giving ajax error when only textbox is rendered by the composite control although the radeditor is added to the controls collection.

I think I am missing something to make this works when Ajax comes in. So I decided to create two composite controls, one for the textbox and one for the radeditor. So far, it is working good.

Thanks!
Tags
Editor
Asked by
Jun
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jun
Top achievements
Rank 1
Share this question
or