Man!
Man, it is wierd code from official demo, it's not mine! Can't believe it is difficult for YOU to understand and reproduce it!
Please clarify – do you need all of my solution files or what part of it?
Oleg, please take a look at “Row Editing” -> “Custom Edit” sample at http://www.trirand.com/blog/jq…..qgrid.html
Here is the exotical code, starting with “onclick=” and sample, where the afterSubmit is called once only – first time you click submit with any options.
Please, try – i used this sample to reproduce the behavior.
— my code —
onclick=”jQuery('#list').jqGrid('editGridRow', '” + cl + “', {recreateForm: true, reloadAfterSubmit:true, modal: false, closeAfterAdd:true, closeAfterEdit:true, afterSubmit:function(response) { clientCallBack(response) } });”
…
function clientCallBack(serverArgs) {
alert('Just once!');
}
Hmm, actually no change in behavior! For this code:
onclick=”jQuery('#list').jqGrid('editGridRow', '” + cl +”', {recreateForm: true, reloadAfterSubmit:true, modal: false, closeAfterAdd:true, closeAfterEdit:true, afterSubmit:function(response) { clientCallBack(response) } });
“clientCallBack(response)” was called only once – when “save” button was pressed for the first time.
How to check form values for all others savings not only first? Or what I'm doing wrong please?
Thanks for your attention Oleg!
It looks like you understand and solved my problem, but I only can check the solution at Monday 
And one more question is why in this case
{reloadAfterSubmit:true, closeAfterAdd:true, afterSubmit : function(response, postdata) { alert(response.responseText); }
afterSubmit function called just once – for the first save. How to force it to call on every save event?
Appreciate any help
Just what I need Tony, thanks!!! BTW, in new notation it will be
jQuery(“#rpsrgrid”).jqGrid('editGridRow', 'new', ….
But what if I would like to call en external function from here?
How to make that?
I've got both edit buttons – in row and in footer.
It's ok when calling external function from footer, but it doesn't work when we using described method
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top