Add a row from JSON (string or object)


Is it possible to dynamically add a row in a TreeGrid from a JSON object or String, so the Grid will also add all sub-rows, icons, etc…

Ex : The tree grid looks like :

| -- Node 1      yyy
| -- Node 2      xxx

After selecting “Node 2 xxx”, a request will be made, and the response should be added under the Node 2.

| -- Node 1                        yyy
| -- Node 2                        xxx
        |-- SubNode 1              zzz
        |-- SubNode 2              vvv
                 |-- SubSubNode 1  kkk 

I know I can use the treegrid.addRow(new_id, text, ind) function, but I have to parse the JSON myself… and rewrite all conversion from business object to json in javascript.

Any suggestions is welcome,

Thank you,

Aurélien Lansmanne.

It not possible to add row from JSON array or object. As a workaround you can use updateFromXML() method. Please find more information here … atefromxml