Results 1 to 5 of 5

Thread: Extjs, filter tree.Panel by record.data.id

  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    26
    Answers
    2

    Default Extjs, filter tree.Panel by record.data.id

    I know there are many things about this item, but i can't do my job and if you can give me some advice , please help me, my task is following: I have tree
    Code:
    var myTree = Ext.create('App.Tree', {
     listeners: { 
    itemclick: { 
    fn: function(view, record, item, index, event) { 
    console.log( record.data.id); }
     }
     });

    my goal is display, show nodes which's data.id is for example 5.. i know there is filterBy function for this but..

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    What do you mean by displaying only node id 5? Seems like using filterBy on the store would be much easier, but since you put the listener on the click I'm guessing there is a reason? So clicking on the node makes all others disappear?
    https://fiddle.sencha.com/#fiddle/19n

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    26
    Answers
    2

    Default

    my tree store is't static, nodes have some other datas, record.data.id,record.data.someId.. storeLoad method loads all data, and i want to display only some of them(with their chilldrens).and with itemclik i wanted to show record.data.id..reality i have combo, and when i will choose one row,the explicit tree have to open in window..sorry form my english

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Have you seen this?
    https://gist.github.com/colinramsay/1789536

    Perhaps you could get it working with your combo.

  5. #5
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Here's a tree filtering example I came across that might also be helpful for you:
    https://fiddle.sencha.com/#fiddle/1ag

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
  •