Hi I want to bind easyui treegrid. I hava following data
| id | name | parent |
| 1 | C | NULL |
| 2 | Program Files | 1 |
| 3 | Windows | 1 |
| 4 | Microsoft Sql Server | 2 |
| 5 | Microsoft .Net | 3 |
how can I return a string in the following format from web method
[{ "id":1, "name":"C", "children":[{ "id":2, "name":"Program Files", "children":[{ "id":4, "name":"Microsoft Sql Server", }] },{ "id":3, "name":"WINDOWS", "children":[{ "id":5, "name":"Microsoft .Net" }] }] } }] }]
Manish Kumar ChoudharyPosted Dec 1, 2014, 1:59 AM
Hi Shekhar Dalvi,
Read these links it may help you
http://www.codeproject.com/Articles/667524/JSON-ASP-NET-Web-Services-with-jQuery
http://williamsportwebdeveloper.com/cgi/wp/?p=494