function onActionRenderer(e) {
var LQdatagrid = e.sender;
var SNdatagrid = e.sender;
var record = e.record;
var uid = record._uid;
var rowIndex = e.rowIndex;
//编辑行操作
var s = ' <a class="Edit_Button" href="javascript:editRow(\'' + uid + '\')" >Edit</a>'
if (LQdatagrid.isEditingRow(record)||SNdatagrid.isEditingRow(record)) {
s = '<a class="Update_Button" href="javascript:updateRow(\'' + uid + '\')">Update</a>'
}
return s;
}
function onActionRenderer(e) {
var LQdatagrid = e.sender;
var SNdatagrid = e.sender;
var record = e.record;
var uid = record._uid;
var rowIndex = e.rowIndex;
//编辑行操作
var s = ' <a class="Edit_Button" href="javascript:editRow(\'' + uid + '\')" >Edit</a>'
if (LQdatagrid.isEditingRow(record)) {
s = '<a class="Update_Button" href="javascript:updateRow(\'' + uid + '\')">Update</a>'
} if(SNdatagrid.isEditingRow(record)){
s = '<a class="Update_Button" href="javascript:update(\'' + uid + '\')">123</a>'
}
return s;
}
function editRow(row_uid) {
var LQrow = LQdatagrid.getRowByUID(row_uid);
var SNrow = SNdatagrid.getRowByUID(row_uid);
if (LQrow||SNrow) {
//
LQdatagrid.cancelEdit();
LQdatagrid.beginEditRow(LQrow);
function updateRow(row_uid) {
var row = LQdatagrid.getRowByUID(row_uid);
LQdatagrid.commitEdit();
var rowData = LQdatagrid.getChanges();
//LQdatagrid.loading("保存中,请稍后......");
var json = mini.encode(rowData);
},
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR.responseText);
}
});
}
//==============================
function update(row_uid) {
var row = SNdatagrid.getRowByUID(row_uid);
SNdatagrid.commitEdit();
var rowData = SNdatagrid.getChanges();
//LQdatagrid.loading("保存中,请稍后......");
var json = mini.encode(rowData);