Skip to content
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

delGridRow errorTextFormat option wont effect when del option returns 500 error #1062

Closed
lonelystellar opened this issue May 3, 2024 · 2 comments

Comments

@lonelystellar
Copy link

Since v5.8.2,the del operation button click event in delGridRow function wont effect when server returns 500 error.

In v5.8.1 delGridRow function code sinppet like bellow:

$("#dData","#"+dtbl+"_2").click(function(){
...
var ajaxOptions = $.extend({
  url: rp_ge[$t.p.id].url || $($t).jqGrid('getGridParam','editurl'),
  type: rp_ge[$t.p.id].mtype,
  data: $.jgrid.isFunction(rp_ge[$t.p.id].serializeDelData) ? rp_ge[$t.p.id].serializeDelData.call($t,postd) : postd,
	**complete**:function(data,status){
...

Works fine with any server error returns.

But since v5.8.1, this ajax complete funciton became to success.
And that will not effect when server returns error.
Based on jquery ajax function definition, the server errors occured will only calls error function instead of success.

@tonytomov
Copy link
Owner

Hello,

We changed this because of server latency. In most times the complete event causes a lot of delay which is not acceptable in certain situation. For this purpose in jqGrid code we changed to use only success event in all ajax requests.

As you say server errors should be catch in error ajax request, which we do.

@tonytomov
Copy link
Owner

Use the common $.jgrid.ajaxOptions to add error function or pass ajaxDelOptions with the same to the delGridRow to solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants