Results 1 to 4 of 4

Thread: How to scroll to selected item in Ext.tree.List

  1. #1

    Default How to scroll to selected item in Ext.tree.List

    Hi!

    I have a Ext.tree.List as a navigation-bar on the side of my page, like in the Admin-dashboard from sencha: http://examples.sencha.com/extjs/6.5...ard/#dashboard.
    In my case I have more items and its scrollable. How can I scroll to a programmatically selected item.

    I tried scrollIntoView form the node but it didn't work.

    Thanks

  2. #2

  3. #3

    Default

    I don't have a table, my TreeList has no function called ensureVisible

  4. #4

    Default

    For anyone who needs it:

    Code:
    var node = treelist.getSelection();
    var container = treelist.ownerCt;
    if(node){
        var nodeItem = treeList.getItem(node);
        container.setScrollY(nodeitem.el.getY() - container.getHeight()/2, true);
    }

Similar Threads

  1. Scroll to selected list item
    By das_ricardo in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 20 Jun 2016, 5:56 AM
  2. Scroll to view the selected list item function
    By elwhiz in forum Sencha Touch 2.x: Discussion
    Replies: 19
    Last Post: 5 Jul 2013, 8:02 AM
  3. Scroll to an selected Item in a List
    By milo08 in forum Sencha Touch 1.x: Discussion
    Replies: 8
    Last Post: 2 Dec 2012, 11:52 PM
  4. scroll to selected list item from record
    By paulroth3d in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 25 Jul 2012, 3:17 AM
  5. Replies: 5
    Last Post: 26 Jun 2009, 2:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •