mojopower

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • mojopower
    Participant

    Man!

    mojopower
    Participant

    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?

    mojopower
    Participant

    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!');
    }

    mojopower
    Participant

    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?

    mojopower
    Participant

    Thanks for your attention Oleg!

    It looks like you understand and solved my problem, but I only can check the solution at Monday Laugh

    mojopower
    Participant

    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

    mojopower
    Participant

    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

Viewing 7 replies - 1 through 7 (of 7 total)

Stay connected with us in your favorite flavor!