scrollIntoView not working for TreeView in a ComboBox

2 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 24 Apr 2013 Link to this post

    I've got this as my code for the ComboBox opened client-side event...
    function DropdownOpened(sender, e)
    {
        var treeView = sender.get_items().getItem(0).findControl("RadTreeView1");
        treeView.get_element().focus();
        var node = treeView.get_selectedNode();
        if (node)
        {
            while (node.get_parent() && node.get_parent() instanceof Telerik.Web.UI.RadTreeNode)
            {
                node.set_expanded(true);
                node = node.get_parent();
            }
            treeView.get_selectedNode().scrollIntoView();
        }
    }

    The code works but the scrollIntoView call doesn't have any impact.

    FWIW, I've tried wrapping the scrollIntoView call in a timeout call but to no avail.

    Am I doing it wrong or are my expectations too high?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Apr 2013 Link to this post

    Hi,

    Please have a look at this demo on TreeView in Combobox which deals with a similar scenario.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top