inline Delete aftersubmit event not work

Questionsinline Delete aftersubmit event not work
Ivan asked 5 years ago

Hi to all,
this code :

$opt["delete_options"]["afterSubmit"] = "function() { return [true,'']; }";

not work with inline delete on the column Actions , why?

Thanks in advance.

3 Answers
Abu Ghufran answered 5 years ago

The afterSubmit only works with dialog.
You can connect on_delete event handler and perform validation there.

refer demos/editing/servre-validation.php (exist in licensed ver)

Ivan answered 5 years ago

Thankyou , but i resolve with this :

if ($this->actions["delete"] !== false && $this->actions["deleteReload"] == false){ $Vbdbd5632ce745fb23276e53b9b5c6e[] = "<a title="Delete this row" href="javascript:void(0);" onclick="jQuery('#$grid_id').delGridRow(''+cl+'',{afterSubmit:function(data,postd){ return [true,''+''];},errorTextFormat:function(r){ return r.responseText;}}); jQuery('#delmod$grid_id').abscenter(); ">Delete</a>";}
else{ $Vbdbd5632ce745fb23276e53b9b5c6e[] = "<a title="Delete this row" href="javascript:void(0);" onclick="jQuery('#$grid_id').delGridRow(''+cl+'',{afterSubmit:function(data,postd){window.location.reload(); return [true,''+''];},errorTextFormat:function(r){ return r.responseText;}}); jQuery('#delmod$grid_id').abscenter(); ">Delete</a>"; }

Ivan answered 5 years ago

i add a new action and i rewrite a jqgrid_dist.php

Your Answer

17 + 18 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!