87,910
社区成员
发帖
与我相关
我的任务
分享
$("#YDFJDg").editgrid({
singleSelect: true,
height: 335,
remoteSort: true,
kBoard: { //键盘控制属性
autoNewRow: true, //自动添新加行
onBeforeNextRow: LYFunction_ValRow, //通过按键转向下一行之前
onBeforePrevRow: LYFunction_ValRow //通过按键转向上一行之前
},
onRowBlur: function(rowIndex, rowData) {
return LYFunction_ValRow(rowIndex, rowData);//行离开事件,传递编辑的行
},
columns: [
[{
field: 'del',
width: '50',
align: 'center',
hidden: true,
formatter: function(value, row, index) {
return '<a href="#" onclick="jxhtItemDg_delrow(\'#YDFJDg\',\'YEARMONTH\',' + row.YEARMONTH + ')">删除</a>';
}
}, {
title: '年月',
field: 'YEARMONTH',
width: '140',
align: 'center'
}, {
title: '保底保底毛利(含税)',
field: 'BDXSJH',
width: '150',
align: 'center',
editor: {
type: 'numberbox',
options: {
min: 0,
precision: 0,
required: true,
onChange: function(newValue, oldValue) {
YDFJDBONBlur();//触发合计方法
}
}
}
}, {
//后面略。。
加载页面时在$(function){
//$("#YDFJDg").editgrid('keyBoardInit');//键盘监听
}