1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    22
    Answers
    2
    Vote Rating
    0
    Ibrahimp is on a distinguished road

      0  

    Default Unanswered: error on getSelectedNode() on Ext.tree.Panel - extjs-4.1.0 lib

    Unanswered: error on getSelectedNode() on Ext.tree.Panel - extjs-4.1.0 lib


    var tree = Ext.getCmp("menu-tree");
    var selectedNode = tree.getSelectionModel().getSelectedNode();


    i am getting error on 2nd line.

    'Error: Object doesn't support property or method 'getSelectedNode''

    here, I'm trying to get the current selected node of tree.

    whats wrong?
    Thanks,
    ibrahim

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi ibrahimp,
    Try the code given below:


    Code:
    var tree = Ext.getCmp("menu-tree"); 
    var selectedNode = tree.getSelectionModel().getLastSelected();
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

Thread Participants: 1

Tags for this Thread