- 注册时间
- 2017-8-2
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 21
- 精华
- 0
- 帖子
- 0
|
felt 发表于 2017-8-2 11:02
请使用cobom.setData(data),
这里参数data需要是数组。
你好版主,再请教一个datagrid赋值的问题,
XMLHttp.sendReq('POST', {}, paramdata, "http://localhost/DCSWEBService/Service.asmx/MiNiUserInfoBind", sucess, erro, {});
function sucess(data) {
var json = mini.decode(data.d)//转换成json对象
if (json.Success == "true") {
if (json.Code == "1") {
var data = JSON.parse(json.Value);
grid.setData(data);
}
}
else//失败
{
alert(json.Message)
}
}
前台JS
{"d":"{\"Success\":\"true\",\"Code\":\"1\",\"Message\":\"成功\",\"Value\":\"{\\\"total\\\":5,\\\"data\\\":[{\\\"USERID\\\":\\\"01be5d7522984b4791bbceed3a834ff2\\\",\\\"USERNM\\\":\\\"11\\\",\\\"USERPASWD\\\":\\\"11\\\",\\\"ISAD\\\":\\\"True\\\",\\\"ORGID\\\":\\\"1dd3661ba51a4248848bfaaf89fb5763\\\",\\\"ORGNM\\\":\\\"长丝\\\",\\\"REMARK\\\":\\\"1\\\",\\\"ISADMIN\\\":\\\"True\\\"},{\\\"USERID\\\":\\\"142a26abf05c4e43accfaf98040a1b93\\\",\\\"USERNM\\\":\\\"22\\\",\\\"USERPASWD\\\":\\\"22\\\",\\\"ISAD\\\":\\\"True\\\",\\\"ORGID\\\":\\\"420af7afa5bd4747afefc2c535466b99\\\",\\\"ORGNM\\\":\\\"短丝\\\",\\\"REMARK\\\":\\\"2\\\",\\\"ISADMIN\\\":\\\"True\\\"},{\\\"USERID\\\":\\\"21b8bf75c07d4ab784f53d206164aded\\\",\\\"USERNM\\\":\\\"33\\\",\\\"USERPASWD\\\":\\\"33\\\",\\\"ISAD\\\":\\\"True\\\",\\\"ORGID\\\":\\\"f51fc207dd2141dbb98cd0a2ac8cf1b4\\\",\\\"ORGNM\\\":\\\"聚丙烯\\\",\\\"REMARK\\\":\\\"3\\\",\\\"ISADMIN\\\":\\\"True\\\"},{\\\"USERID\\\":\\\"539182495abe4e8aa24d7bdfb1e8cc52\\\",\\\"USERNM\\\":\\\"44\\\",\\\"USERPASWD\\\":\\\"44\\\",\\\"ISAD\\\":\\\"False\\\",\\\"ORGID\\\":\\\"5dcecfcacb034f288ad780591a9a2c3a\\\",\\\"ORGNM\\\":\\\"信息中心\\\",\\\"REMARK\\\":\\\"1\\\",\\\"ISADMIN\\\":\\\"False\\\"},{\\\"USERID\\\":\\\"6b171eee2a2b4b14a53ee8fa68b973d4\\\",\\\"USERNM\\\":\\\"55\\\",\\\"USERPASWD\\\":\\\"55\\\",\\\"ISAD\\\":\\\"False\\\",\\\"ORGID\\\":\\\"5dcecfcacb034f288ad780591a9a2c3a\\\",\\\"ORGNM\\\":\\\"信息中心\\\",\\\"REMARK\\\":\\\"11\\\",\\\"ISADMIN\\\":\\\"False\\\"}]}\"}"}
这是返回的JSON格式,使用grid.setData(data),怎么不加载数据呢???? |
|