jqGrid这些列是死了的,现在要从数据库中动态读取这些列添加到页面上,如何实现 5
1个回答
展开全部
在JS中JqGrid的代码加上
jsonReader:{
root:"gridModel",
records:"record",
repeatitems:false
},
后台返回JSON数据:{"gridModel":[
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
....
],"rows":15,"record":95,"page":1,"total":7,"sord":null,"sidx":null,"search":null}
jsonReader:{
root:"gridModel",
records:"record",
repeatitems:false
},
后台返回JSON数据:{"gridModel":[
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
{"seihin_bango":"值","seihin_meisho":"值","kishu":“值”,"buhin_bango":"值",.....},
....
],"rows":15,"record":95,"page":1,"total":7,"sord":null,"sidx":null,"search":null}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询