easyui treegrid中的json数据如何拼装额?求助啊最好能贴上代码
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏15(财富值+成长值)
1个回答
2015-07-16
展开全部
后台拼rows
{"total":20,"rows":[
{"id":1,"code":"code1","name":"name1","addr":"address1"},
{"id":11,"code":"code11","name":"name11","addr":"address11","_parentId":1},
{"id":12,"code":"code12","name":"name12","addr":"address12","_parentId":1},
{"id":2,"code":"code2","name":"name2","addr":"address2","state":"closed"},
{"id":21,"code":"code21","name":"name21","addr":"address21","_parentId":2},
{"id":22,"code":"code22","name":"name22","addr":"address22","_parentId":2},
{"id":3,"code":"code3","name":"name3","addr":"address3","state":"closed"},
{"id":31,"code":"code31","name":"name31","addr":"address31","_parentId":3},
{"id":32,"code":"code32","name":"name32","addr":"address32","_parentId":3},
{"id":4,"code":"code4","name":"name4","addr":"address4","state":"closed"},
{"id":41,"code":"code41","name":"name41","addr":"address41","_parentId":4},
{"id":42,"code":"code42","name":"name42","addr":"address42","_parentId":4}
]}
添加 _parentID即可
{"total":20,"rows":[
{"id":1,"code":"code1","name":"name1","addr":"address1"},
{"id":11,"code":"code11","name":"name11","addr":"address11","_parentId":1},
{"id":12,"code":"code12","name":"name12","addr":"address12","_parentId":1},
{"id":2,"code":"code2","name":"name2","addr":"address2","state":"closed"},
{"id":21,"code":"code21","name":"name21","addr":"address21","_parentId":2},
{"id":22,"code":"code22","name":"name22","addr":"address22","_parentId":2},
{"id":3,"code":"code3","name":"name3","addr":"address3","state":"closed"},
{"id":31,"code":"code31","name":"name31","addr":"address31","_parentId":3},
{"id":32,"code":"code32","name":"name32","addr":"address32","_parentId":3},
{"id":4,"code":"code4","name":"name4","addr":"address4","state":"closed"},
{"id":41,"code":"code41","name":"name41","addr":"address41","_parentId":4},
{"id":42,"code":"code42","name":"name42","addr":"address42","_parentId":4}
]}
添加 _parentID即可
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询