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

RadComboBox in composite control

4 Answers 121 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 16 Jan 2008, 03:23 PM
Hi

I'm trying to make a custom composite control which has a RadTreeView in a RadCombo.

I've duplicated the example from the demo site, with the TreeView created dynamically in a template.

I'm almost there except I'm having problem accessing the RadComboBox on the client side.

The problem is on the client side code:
    comboBox = $find('" + ComboTree.ClientId + '");
    comboBox.set_text(node.get_text()); *** Error here ***

The error is: This object does not support this method or property.

If I add a RadComboBox to the page as RadComboBox1 and change the javascript to 
    comboBox = $find('RadComboBox1');
instead of 
    comboBox = $find('" + ComboTree.ClientId + '");
the manually added RadCombo gets the Text from the Tree.

If I add the line alert(node.get_text());  the alertbox shows the corrent item from the tree.

I've tried the following function as well to try to find the problem:

function GetComboId(sender, args) {
    var TreeCombo = sender;
    alert(sender.get_id());
}

And executed this function OnClientDropDownOpening and I get the same error.

My custom control descends from System.Web.Ui.Control and implements INamingContainer.

I do set the Id's of the custom control, RadComboBox and RadTreeView.


Any ideas????

Many thanks

Nick Crisp

4 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 16 Jan 2008, 04:59 PM
Hello Nicholas Crisp,

I suggest that you open a support ticket and send us a simple and running project illustrating the problem. We will test it locally and provide  you with a solution or more specific instructions.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Nicholas
Top achievements
Rank 1
answered on 17 Jan 2008, 02:03 PM
Hi

Thanks for your reply.

I've now resolved the issue.

I was using the Treeview from Prometheus, but the Combo was from the ASP.Net suite which was why none of the Javascript was working.

Can't believe this took me so long to realise.....

Regards

Nick
0
MIke Mlachak
Top achievements
Rank 1
answered on 17 Sep 2009, 10:56 PM
Nick,

Would You be willing to share your code for the composite control that wraps a RadTree in a Combobox? I am in need of something similar, but based on the ASP.Net Ajax.
0
Veselin Vasilev
Telerik team
answered on 22 Sep 2009, 12:46 PM
Hi MIke Mlachak,

Please find attached a simple application. It uses a user control with RadTreeView in RadComboBox.

I hope this helps.

Sincerely yours,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Nicholas
Top achievements
Rank 1
MIke Mlachak
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or