本帖最后由 黑夜 于 2013-12-28 22:24 编辑
FineUI GRID
// 添加一条新纪录
x_addNewRecord: function (defaultObj, appendToEnd) {
var i, count, store = this.getStore();
var recordType = store.recordType;
var newRecord = new recordType(defaultObj);
this.stopEditing();
if (appendToEnd) {
store.add(newRecord);
// 新增客户端改变的行索引
//this.x_newAddedRows.push(store.getCount() - 1);
} else {
store.insert(0, newRecord);
// 新增客户端改变的行索引
//for (i = 0, count = this.x_newAddedRows.length; i < count; i++) {
// this.x_newAddedRows++;
//}
//this.x_newAddedRows.push(0);
}
this.startEditing(0, 0); //Note:这行有无更好处理方法? 难道要添加一个 x_addNewRecord: function (defaultObj, appendToEnd,rowindex,colindex) ?
},
|