1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    agilene is on a distinguished road

      0  

    Default Select Node Tree Panel Extjs 4 by Id

    Select Node Tree Panel Extjs 4 by Id


    How can i select node in tree panel by its id in extjs 4. Sample in extjs 2
    treePanel.getNodeById(id).select();
    when i use this method:
    id='nodetrans';
    treePanel.getSelectionModel().select(id);
    its ouput nothing

    but when i use index, like:
    index=0;
    treePanel.getSelectionModel().select(index);
    that's work..

    But I want call id instead of index . Please help me

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    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 agilene,

    The tree.getSelectionModel().select(record) function can accept a record instance instead of an id. I would do something like this:
    Code:
       var record = treePanel.getStore().getNodeById('item_id');
                treePanel.getSelectionModel().select(record)
    


    Working sample example - http://jsfiddle.net/TBa2E/

    also see this thread -
    http://stackoverflow.com/questions/6...y-record-index
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    agilene is on a distinguished road

      0  

    Default


    thanks Sword-It

    i see now,, i put this
    Code:
    var record = store.getNodeById(tab.id);
                  treePanel.getSelectionModel().select(record)
    and works.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi