Expand or Collapse from client-side?

10 posts, 0 answers
  1. Eddie
    Eddie avatar
    66 posts
    Member since:
    May 2008

    Posted 27 Feb 2013 Link to this post

    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!
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 28 Feb 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eddie
    Eddie avatar
    66 posts
    Member since:
    May 2008

    Posted 28 Feb 2013 Link to this post

    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!
  5. Eric
    Eric avatar
    16 posts
    Member since:
    Feb 2013

    Posted 28 Feb 2013 Link to this post

    This is possible to do

    function onEntryAdded(sender, eventArgs) {
                //close the dropdown
                sender.closeDropDown();
            }
  6. Eddie
    Eddie avatar
    66 posts
    Member since:
    May 2008

    Posted 01 Mar 2013 Link to this post

    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
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 04 Mar 2013 Link to this post

    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.
  8. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 21 Aug 2013 Link to this post

  9. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 26 Aug 2013 Link to this post

    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.
  10. César
    César avatar
    14 posts
    Member since:
    Sep 2013

    Posted 06 Nov 2013 Link to this post

    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
  11. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 11 Nov 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017