DataGrid 使用

$('#magazineGrid').datagrid({

height: 340,

url: 'url',

method: 'POST',

queryParams: { 'id': id },

idField: '产品ID',

striped: true,

fitColumns: true,

singleSelect: false,

rownumbers: true,

pagination: false,

nowrap: false,

pageSize: 10,

pageList: [10, 20, 50, 100, 150, 200],

showFooter: true,

columns: [[

{ field: 'ck', checkbox: true },

{ field: '刊名', title: '刊名', width: 180, align: 'left' },

{ field: '类别', title: '类别', width: 150, align: 'left' },

{ field: '月份', title: '月份', width: 100, align: 'left' },

{ field: '期次', title: '期次', width: 100, align: 'left' },

{ field: '价格', title: '价格', width: 100, align: 'right' },

{ field: '订阅数', title: '订阅数', width: 100, align: 'right' },

{ field: '库存数', title: '库存数', width: 100, align: 'right' },

{ field: '邮寄方式', title: '邮寄方式', width: 80, align: 'left' },

{ field: '数量', title: '数量', width: 80, align: 'left',

editor: {

type: 'numberbox',

options: {

min: 0,

precision: 0

}

}

}

]],

onBeforeLoad: function (param) {

},

onLoadSuccess: function (data) {

},

onLoadError: function () {

},

onClickCell: function (rowIndex, field, value) {

}

});

猜你喜欢

转载自blog.csdn.net/document_ljt/article/details/82152145