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

Treeview disappears in Combobox

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jaimeet
Top achievements
Rank 1
Jaimeet asked on 23 Nov 2010, 04:17 PM
Hi,

I've been trying  to use a treeview in a combobox, and it works fine when the page initially loads. But, once I open the dropdown and choose a node from the treeview, the next time I open the dropdown the only value that I see in there is the selected node (no treeview or any other values)!

The browser tells me that there is an error in the ClientDropDownOpenedHandler javascript function and gives me the error message: 'null' is null or not an object.

I'm literally just copying over the Travelismo code and running it in Visual Studio, so I've not written any other code.

Please help me out and let me know what I'm doing wrong.

I'm using DLL version 2009.2.616.20 (Q2 2009).

Thanks,
Jay

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 24 Nov 2010, 02:46 PM
Hello Jay,

Unfortunately your problem is due to a bug of the version of the controls that you are using.
It's fixed in the latest version (Q3 2010) which we have just released.
If you couldn't upgrade your controls to the latest version, i could offer you the following solution:
function nodeClicking(sender, args)
            {
                var comboBox = $find("<%= RadComboBox1.ClientID %>");
 
                var node = args.get_node()
 
                comboBox.set_text(node.get_text());
 
                comboBox.trackChanges();
                //This should be removed
                //comboBox.get_items().getItem(0).set_text(node.get_text());
                 
                comboBox.commitChanges();
 
                comboBox.hideDropDown();
 
                // Call comboBox.attachDropDown if:
                // 1) The RadComboBox is inside an AJAX panel.
                // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node.
                // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel.
 
                //comboBox.attachDropDown();
            }


All the best,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jumpstart 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.
Tags
TreeView
Asked by
Jaimeet
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or