jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • noscogeorge
    Participant

    I have a json object sample as fellow

    [
        { 
           "name": "Radiology & Test(Rad)",       
            "children": [
                {
                    "name": "RAD Abdomen",
                    "fk_parent": 26,
                    "code": null,
                    "service_code": null,
                    "service_description": null,
                    "children": [],
                    "claim_history": []
                },
                {
                    "name": "RAD Lower Limb",
                    "fk_parent": 26,
                    "code": null,
                    "service_code": null,
                    "service_description": null,
                    "children": [],
                    "claim_history": []
                }
            ],
            "claim_history": [    
                {
                    "s_code": "RAD-050",
                    "s_description": "Electrocardigram (ECG)",
                    "children": null
                }
            ]
          }
    ]

    here is my angular

    source =
    {
    dataType: “json”,
    dataFields: `[
    { name: ‘unqkey’, type: ‘number’ },
    { name: ‘fk_parent’, type: ‘number’ },
    { name: ‘name’, type: ‘string’ },
    { name: ‘s_code’, type: ‘string’ },
    { name: ‘count_hst_not_approved’, type: ‘number’ },
    { name: ‘count_hst_approved’, type: ‘number’ },
    { name: ‘children’, type: ‘array’ },
    { name: ‘claim_history’, type: ‘array’ },

    ]`,
    hierarchy:
    {
    root:’children’
    },

    id: ‘unqkey’,
    localData:this.dataNode,

    };
    how do add the second array to the hierarchy because this is what i want to achieve
    [![enter image description here](https://i.stack.imgur.com/SMllh.png)](https://i.stack.imgur.com/SMllh.png)

    I tried to
    this.treeGrid.addRow(chid.unqkey,{s_code: ‘DavidTest’,s_description:”,count_hst_approved:”,count_hst_not_approved:”},’2′); it did not work
    I also tried
    hierarchy:
    {
    root:’children’+’claim_history’
    }
    but it did not work

Viewing 1 post (of 1 total)