flexigrid自定义绑定数据源
程序员文章站
2022-03-04 11:28:26
...
flexAddData
var testData = {
"page": 1,
"total": 20,
"rows":
[
{"cell" : ["A", "a group", "0", "d"]},
{"cell" : ["B", "b group", "0", "d"]}
]
}
$("#groups").flexigrid ({
dataType: 'json',
width: 580,
height: 300,
colModel : [
{display: groupName, name: 'groupName', width: 160, sortable: true, align: 'left'},
{display: description, name: 'description', width: 200, sortable: true, align: 'left'},
{display: deviceNumber, name: 'deviceNumber', width: 100, sortable: true, align: 'left'},
{display: del, name: 'del', width: 40, sortable: true, align: 'left'}
]
});
$("#groups").flexAddData(testData);