Results 1 to 4 of 4

Thread: How treepanel display colum1 as a Parent node and Column2 as Child node

  1. #1

    Default How treepanel display colum1 as a Parent node and Column2 as Child node

    Hey,

    I am newbie for Extjs Treepanel I would like to display first column as a Parent node and second column as a child node please let me know how could I have achieve it ?
    Below my code like that I cannot get 2nd column child node please let me know how my tree-panel hierarchy change to accordance output ?

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by [email protected] View Post
    Hey,

    I am newbie for Extjs Treepanel I would like to display first column as a Parent node and second column as a child node please let me know how could I have achieve it ?
    Below my code like that I cannot get 2nd column child node please let me know how my tree-panel hierarchy change to accordance output ?
    Child nodes are based the data provided in the "children" of the parent node. For eample:

    Code:
    {
        text: 'First Level Node',
        children: [{
             text: 'Second Level Node 1'
        },{
             text: 'Second Level Node 2'
        }
        // more nodes...
    }
    You can nest nodes as deep as desired using this approach.

    Please see here for more details: http://docs.sencha.com/extjs/5.1/5.1....NodeInterface

    Hope that helps--thanks!
    Joel

  3. #3

    Default

    Thanks for reply me . I have Json data like: [{ "id":1,"reportTreeType":0,"text":"Root","reportType":null,"reportUrl":"", "hidden":false, "children":[{ "id":5,"reportTreeType":0,"text":"Hardware","reportT??ype":"HardReport","reportUrl":"","hidden":false,"children":[], "leaf":false,"dirName":"","href":"","reportId":0,"qtip":""}]My EXTJS4.0 var tree = new Ext.tree.TreePanel( { id : 'treePanel', el : 'tree-div',root : { nodeType : 'async', text : 'Root', draggable : false, id : '-1', expanded:true, children: [{ text:'HardReport'}] //here HardReport displayed as a Parent Node but I need to make it Child Node })}; General Example :Table 1Column 1 Column2 A PB QC RD SExpected Result like :RootA(Parent Node )P(Child Node)B (Parent Node)Q(Child Node)

  4. #4

    Default

    Still I am not able to display child node from database column 2 data please let me know if any suggestion appreciated .please look reference link further understand my post : http://stackoverflow.com/questions/2...29220_29180855

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
  •