button onComplete

button onComplete

montoyammontoyam Posts: 568Questions: 136Answers: 5

I am struggling with the correct syntax. I want to reload other grids on a page when a record is deleted. I tried this but it doesn't work and I can't find the documentation on how to make it work

            buttons: [
                { extend: 'edit', editor: FundOrgDeptGroupDetailEditor },
                {
                    extend: 'remove', editor: FundOrgDeptGroupDetailEditor
                    , onComplete: function () {
                        alert("reloading");
                        FundOrgDetailTable.ajax.reload();
                        UnAssignedFTETable.ajax.reload();
                    }
                }
            ]

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586
    Answer ✓

    I would use the postRemove event for that. There's an example of an event being called here - that's for postCreate but it'll give you the idea.

    Colin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    Perfect. thanks.

            FundOrgDeptGroupDetailEditor.on('postCreate', function () {
                alert("reloading");
                FundOrgDetailTable.ajax.reload();
                UnAssignedFTETable.ajax.reload();
            });
    
This discussion has been closed.