话不多说,上代码。
$("#forecastGrid").datagrid({
url : contextPath + '/elc/elcForecast/queryPage.arz',
iconCls:'icon-edit',
pagination : true,
pageSize : 5,
pageList: [5, 10],
rownumbers : false,
striped : false,
singleSelect : true,
idField : 'id',
nowrap : true,
pagePosition : 'top',
totalProperty : "total",
rowsProperty : "elcForecasts",
columns : [[{
field : 'parentUid',
hidden:true
},{
field : 'period',
hidden:true
},{
field : 'customerid',
hidden:true
},{
field : 'constraintFlag',
align : 'center',
width : 120,
title : 'Constraint Flag',
editor:{
type:'combobox',
options:{
data: [{value:'Y',text:'Y'},
{value:'N',text:'N'}
],
valueField: "value",
textField: "text",
editable: false,
required : 'required',
onSelect: function () {
endCurEdit(editIndex, 'constraintFlag');
}
}
}
},{
field : 'sku',
align : 'center',
width : 120,
title : 'SKU编码'
},{
field : 'skuNameC',
align : 'center',
width : 120,
title : 'SKU名称'
},{
field : 'totalForecast',
align : 'center',
width :