Results 1 to 2 of 2

Thread: Selection of first node of a tree is not happening

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    85
    Answers
    1

    Default Selection of first node of a tree is not happening

    Hi All,

    I have created a tree panel by specifying the xtype as treecolumn. I want to select the first leaf of the tree as selected one. For this.
    registered a boxready event and written the code like
    boxready : function( treePanel, width, height, eOpts ){
    debugger;
    treePanel.getSelectionModel().select( 0 );
    // treePanel.select( treePanel.getRootNode().getChildAt(0) );
    treePanel.getSelectionModel().selected = 0;
    },
    treePanel.getSelectionModel() is giving me selectionmodel of type SINGLE.

    Can any body please help me to identify where am missing?

    Thanks
    Url

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    85
    Answers
    1

    Default

    Hi All,
    I got the solution , The problem was until the box was ready store is not loaded properly hence items are not there and selection was not happening.
    So by writting the selection code inside the store.onLoad is helpful.




    Thanks
    Url

Posting Permissions

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