Calling endEdit from actionBegin on Kanban Card

I'm trying to rewrite a kanban board from .Net/EJ to .Net Core/EJ2 and running into an issue saving a grid on the edit template.

In my Kanban template onDialogOpen function I create a Grid

                    var grid = new ej.grids.Grid({
                        width: 675,
                        // grid creation code

                    });
                    grid.appendTo('#bids');

I can save the grid content and save the card data separately. I would like to be able to call the grid Update when I save the card but when I try it saves the card data again.

        function kbActionBegin(args) {
            if (args.requestType == 'cardChanged') {
                $("#bids").ej.grids.Grid("endEdit");
            }
        }

From what I can tell from the documentation this should work.


1 Reply

VJ Vinitha Jeyakumar Syncfusion Team March 13, 2024 12:03 PM UTC

Hi Michael Cummins,



We suggest you to use the dialogClose event of the Kanban control to save the grid data instead of using actionBegin event. Please check the code and sample below,


Code snippet:

function dialogClose(args) {
  if (args.requestType == 'Edit') {
    document.getElementById('Grid').ej2_instances[0].endEdit();
  }
}




API Link: https://helpej2.syncfusion.com/documentation/api/kanban#dialogclose


If it doesn't satisfy your requirement, please share us with simple issue replicating runnable sample to validate further.

Regards,
Vinitha

Loader.
Up arrow icon