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
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