EasyUI Forum
December 20, 2025, 04:23:54 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Get server response onDestroy in edatagrid  (Read 9042 times)
Alfred
Full Member
***
Posts: 134


-Licensed User-


View Profile
« 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.

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 10, 2017, 07:40:03 AM »

Please try to download the updated 'edatagrid' plugin from https://www.jeasyui.com/extension/edatagrid.php
Logged
Alfred
Full Member
***
Posts: 134


-Licensed User-


View Profile
« Reply #2 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.
« Last Edit: May 10, 2017, 02:49:52 AM by dove » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!