EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: bbones on April 06, 2015, 12:42:58 AM



Title: Any way to use edatagrid with non-POST services (DELETE, PUT etc.?
Post by: bbones on April 06, 2015, 12:42:58 AM
Hi!

I have a delete service with request method DELETE. May I tune edatagrid use destroyURL with method="DELETE" or I need define onDestroy with ajax call?

Tnx in advance
bbones


Title: Re: Any way to use edatagrid with non-POST services (DELETE, PUT etc.?
Post by: jarry on April 06, 2015, 03:25:45 AM
Only the POST method is supposed in the edatagrid plugin.


Title: Re: Any way to use edatagrid with non-POST services (DELETE, PUT etc.?
Post by: bbones on April 06, 2015, 05:08:35 AM
Ok, tnx, it works fine with

Code:
		
onDestroy : function(index,row){
$.ajax({
url : "/protofront/service/requests/"+row.orderId,
method : "DELETE"
});
}