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

Cannot interact with RadTreeView in RadPanelBar (AJAX)

0 Answers 26 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 28 Aug 2008, 07:52 AM
Problem solved!!  I started from scratch and noticed that this time I used a single ' instead of " at the start and end of the $find. It now works!  (not even sure if this sorted it out)

This may seem to be a trivial question but how do I access the treeview's nodes in a Panelbar?

I have used the following where radLeftPane = PanelBar, Sites = PanelItem and radSites = RadTreeView

Complete function:

 function getCheckedNodes()
        {
            var treeView = $find("<%= radLeftPane.FindItemByText("Sites").FindControl("radSites").ClientID %>");
               var checkedNodes = treeView.get_checkedNodes();
            if (checkedNodes.length > 0)
            {
                var checkedNodesText = new Array();
                for (var i=0; i < checkedNodes.length; i++)
                {
                    Array.add(checkedNodesText, checkedNodes[i].get_text());
                }
                alert(checkedNodesText.join(";"));
            }
            else
            {
                alert("There are no checked nodes!");
            }

        }

Absolutely nothing happens except a postback on the button that runs this code.

Any help will be most appreciated.

No answers yet. Maybe you can help?

Tags
PanelBar
Asked by
Justin
Top achievements
Rank 1
Share this question
or