[CLOSED] How to find Y-Coordinate of a Tree panel selected node

  1. #1

    [CLOSED] How to find Y-Coordinate of a Tree panel selected node

    Hello Team,
    we have a requirement of finding a Y-Coordinate of a selected node in tree panel,
    Initially we are getting the dynamic value from database so that we have to select the tree node dynamically from code behind, here the problem is we are unable to get the dynamically selected tree nodes Y-Coordinate.
    Thanks for your time!
    Last edited by Daniil; Feb 07, 2014 at 7:00 AM. Reason: [CLOSED]
  2. #2
    Hi @mohan.bizbites,

    I don't quite understand why you need Y coordinate of a selected node, but:
    Ext.fly(TreePanel1.selModel.selNode.ui.elNode).getY()
    Though, it might be better to select a node by its id, for example.
  3. #3
    Quote Originally Posted by Daniil View Post
    Ext.fly(TreePanel1.selModel.selNode.ui.elNode).getY()
    Though, it might be better to select a node by its id, for example.


    Hi danil thanks for reply,

    getting error -" Cannot read property ui of undefined " after running script code 'var x= Ext.fly(TreePanel1.selModel.selNode.ui.elNode).get Y() '.

    i am using 2.2 version.

    Thanks
  4. #4
    It was a script for Ext.NET v1.

    In v2 please try this:
    var selectedNode = App.TreePanel1.selModel.getSelection()[0],
        view = App.TreePanel1.getView();
        
    Ext.fly(view.getNode(selectedNode)).getY();

Similar Threads

  1. [CLOSED] how to add a child node to the selected tree node
    By hdsoso in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 18, 2013, 1:10 AM
  2. Replies: 11
    Last Post: Oct 07, 2011, 9:14 AM
  3. Replies: 16
    Last Post: Jul 19, 2011, 3:53 AM
  4. [CLOSED] How to get the current node selected in a tree panel?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 13, 2010, 4:43 PM
  5. Selected Node - tree panel
    By filipator in forum 1.x Help
    Replies: 3
    Last Post: Mar 25, 2009, 2:58 PM

Posting Permissions