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

Expand or Collapse from client-side?

9 Answers 294 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 27 Feb 2013, 08:18 PM
I'm currently using a RadComboBox with a RadTreeView to accomplish the same thing this new control does.  So, logically, I'd like to replace what I am using now with the RadDropDownTree.  Unfortunately I can't figure out how to do some of the client-side stuff I'm doing with the other controls.  For now I just need to expand or collapse the dropdown.  could someone point me to where that's documented?  I couldn't find it in the online docs...

Also, since I'm here, keyboard control is spotty so far.  Once I click within the dropdown tree I can then go up and down to select different nodes, but if I tab to the control and then hit the down arrow nothing happens.  It requires two mouse clicks to begin keyboard control.  Am I missing something?

Thanks!

9 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 28 Feb 2013, 08:24 AM
Hello Eddie,

With RadDropDownTree control you could only set expanded state of the nodes at the server side during NodeDataBound event or using the ExpandAllDropDownNodes method to expand all of the nodes. Regarding to the keyboard support we are going to add that feature for the next version of the control.

Kind regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Software
Top achievements
Rank 1
answered on 28 Feb 2013, 03:46 PM
So, just to confirm, there is no way to collapse, or close, the dropdown from the client side?  I'm not interested in expanding or collapsing the nodes, just the dropdown itself.  The problem I am having now is that if the user selects one of the nodes (adds an entry) and then tabs away from the control it submits the form.  I have autopostback set to false, so I'm not sure what's triggering this, but I was hoping if I could just close the dropdown when they select a node, then I could avoid the tab out of the control.  Please confirm that there is no client-side method for opening and closing the dropdown.

Thanks!
0
Eric
Top achievements
Rank 1
answered on 28 Feb 2013, 07:23 PM
This is possible to do

function onEntryAdded(sender, eventArgs) {
            //close the dropdown
            sender.closeDropDown();
        }
0
Software
Top achievements
Rank 1
answered on 01 Mar 2013, 05:13 PM
That worked for me, thanks Eric!

Another question I've now run into - I have to populate a search form from a querystring and I can't figure out how to "select" one of the nodes in the DropDownTree.  In other words, in the code behind I just want to check to see if the value is being passed in the querystring, and if so, set the TEXT of the DropDownTree to that value.  In a perfect world, I would also select the node in the tree, but I'll settle for just setting the text and value of the control so that if the user wants to just hit "Search", it actually works...

Thanks again!
Eddie
0
Peter Filipov
Telerik team
answered on 04 Mar 2013, 09:09 AM
Hello,

We are going to update our online documentation soon and put some examples how to use closeDropDown, openDropDown and toggleDropDown client side methods. It is not possible to pre-select a node in the code behind and respectively create an entry.The control relies only on user interaction in its first version. For the next release we are going to expose functionality to create entry during NodeDataBound server side event.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 21 Aug 2013, 02:29 PM
0
Peter Filipov
Telerik team
answered on 26 Aug 2013, 07:27 AM
Hi Erik,

Please review the thread. I have posted a reply in it.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
César
Top achievements
Rank 1
answered on 06 Nov 2013, 05:19 PM
Hi,

This thread is similar that this one. I've also replied there. 

function onEntryAdded(sender, eventArgs) {
            //close the dropdown
            sender.closeDropDown();
        }

The code above suggested in this thread seems is not valid when using the keyboard, as each time you press the arrow to step each of the nodes, the code closes the control.

Is there any option to avoid this?

Thanks
0
Peter Filipov
Telerik team
answered on 11 Nov 2013, 09:28 AM
Hello César,

The feature is in a development phase. It is going to work as you expected. For now it is not possible to workaround it.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
DropDownTree
Asked by
Software
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Software
Top achievements
Rank 1
Eric
Top achievements
Rank 1
Erik
Top achievements
Rank 2
César
Top achievements
Rank 1
Share this question
or