New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline multi-line edit mode get changed rows, similar getChangeCells #741
Comments
initInlineEditData : function(data){ |
Hello,
Which changes do you mean? |
Change is actually edit those lines, and the data compared to the previous row, the row has been modified record. such as: After editing :{id:"1", name:"22", age:"21"}, {id:"2", name:"24", age:"24"}, Changes row : id=2,id = new_id The most basic is to get the actual modified rows. If you provide more advanced methods, similar getChangeCells parameters obtained by the modified row or rows actually modify the column control |
HEllo, You can compare the data with the savedRow grid parameter and serializeRowData |
After the inline edit multiple lines, call the Save method to save to clientArray, there is no way to get those changes row?
Modify the source code, the code is as follows:
loadComplete:function(){
$(this).jqGrid("initInlineEditData");
}
getChangeRows : function(options){
var $t= this[0];
if (!$t.grid) {
return;
}
var ret=[];
var exInitDatas = $($t).jqGrid("getInitInlineEditData");
$($t.rows).each(function(iRow){
var res = {};
if ($(this).attr("editable") === "0") {
if (cm.exaddeditdata || (nm !== 'cb' && nm !== 'subgrid' && cm.editable===true && nm !== 'rn' && !$(this).hasClass('not-editable-cell'))) {
try {
res[nm] = $.unformat.call($t,this,{rowId:$t.rows[iRow].id,colModel:cm},iCol);
} catch (e) {
res[nm] = $.jgrid.htmlDecode($(this).html());
}
}
});
I do not know whether there are better ways and recommendations?
The text was updated successfully, but these errors were encountered: