slickGridHeadColumns = [//表头
{"display": true, "field": "taskName", "id": 110102, "name": "任务名称", "width": 300, "editor": Slick.Editors.Text},
{"display": true, "field": "status", "id": 110103, "name": "状态", "width": 80},
{"display": true, "field": "siteCode", "id": 110104, "name": "站点", "width": 80},
{"display": true, "field": "ebayAccountName", "id": 110105, "name": "EBAY账户", "width": 180},
{"display": true, "field": "createdDate", "id": 110106, "name": "创建时间", "width": 180},
{"display": true, "field": "successCount", "id": 110107, "name": "成功数量", "width": 180},
{"display": true, "field": "faildCount", "id": 110108, "name": "失败数量", "width": 180},
{"display": true, "field": "operationId", "id": 110109, "name": "操作", "width": 200}
],
gridOptions = {//表格大小参数
editable: true,
asyncEditorLoading: false,
autoEdit: false,
enableAddRow: false,
enableCellNavigation: true,
rowHeight: 30
};
var item = {};
//可编辑事件失焦前触发的函数
grid.onBeforeEditCell.subscribe(function (e, args) {
item = objThis.slickGridView.getItem(args.row);
});
//可编辑事件失焦后触发的函数
grid.onBeforeCellEditorDestroy.subscribe(function (e, args) {
console.log(item);//这里的args与onBeforeEditCell 中的不同,失去焦点之后会把当前行的对象丢失
item = {};
});