EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Alfred on April 09, 2017, 10:32:03 AM



Title: Get server response onDestroy in edatagrid
Post by: Alfred on April 09, 2017, 10:32:03 AM
How can we get server response when we delete a row in edatagrid? I am trying this code below but it does not work.

Code:
onDestroy:function(index,row){
                    console.log(row);
                    $.messager.show({
                        title:'Delete Info',
                        msg:row.msg,
                        showType:'show',
                        style:{
                            right:'',
                            top:document.body.scrollTop+document.documentElement.scrollTop,
                            bottom:''
                        }
                    });

On the server side, I have this code:

       
Code:
if ($result){
   echo json_encode(array(
'success'=>true,
'msg'=>$msg
));
exit;
} else {
echo json_encode(array(
'isError'=>true,
'msg'=>'No change in the invoice .'));
exit;
}

the
Code:
console.log(row)
gives me the details of the row I deleted. But I want to get the msg (customized message) I made on the serverside page. I tried onSuccess() method but this does not fire when we delete row. Please help. Thanks.



Title: Re: Get server response onDestroy in edatagrid
Post by: stworthy on April 10, 2017, 07:40:03 AM
Please try to download the updated 'edatagrid' plugin from https://www.jeasyui.com/extension/edatagrid.php


Title: Re: Get server response onDestroy in edatagrid
Post by: Alfred on April 14, 2017, 10:24:11 AM
Thanks. But what are the parameters that should be returned from the server? Mine is not still working. Please help. Downloading and using the above link does not solve the problem.