This is a migrated thread and some comments may be shown as answers.
Dynamically added RadComboBox throw JS error
0 Answers 20 Views
This is a migrated thread and some comments may be shown as answers.
Datamex
Top achievements
Rank 2
Datamex asked on 05 Aug 2009, 08:53 AM
Hello,

I'm adding several RadComboBoxes into a custom made user control. The controls are contained in a panel. When I view the page, I get a JS error on the line 

this._originalText=this.get_inputDomElement().value;

The error is "this.get_inputDomElement() has no properties". So apparantly the get_inputDomElement method return null? The first RadComboBox on the form is working as expected, the second one isn't doing anything; it doesn't even expand.

Any idea what I could be missing here? The version I'm running is 2009.2.701.35.

The code I'm using to add the dropdown (in simplified form, it's not working as such):

 

protected override void OnInit(EventArgs e)

 

    base.OnInit(e);

 

    Panel newPanel = new Panel();

 

    dropdown =

new RadComboBox();

 

    dropdown.ID =

Guid.NewGuid().ToString();

 

    newPanel.Controls.Add(dropdown);
    

this.Controls.Add(newPanel);
}

 

EDIT: sorry, already fixed it. There were some other things going wrong in the user control which probably messed up the RadComboBox. This post may be deleted.

 

No answers yet. Maybe you can help?

Asked by
Datamex
Top achievements
Rank 2
Share this question
or