Prevent dialog edit from closing after save

Hello

I use dialog and template edit mode to add and update a new record.

I want after save operation, record to be saved, but the dialog to remain open. 

Thanks a lot.



3 Replies 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team November 28, 2022 11:34 AM UTC


Hi Dragan,


Greetings from Syncfusion support


We would like to inform that by setting args.cancel as true will prevent the inbuilt operation. Here we have used ActionBegin event of DataGrid and by using the request type as Save we have prevented the inbuilt operation. Kindly check the attached code snippet and documentation for your reference.


public async Task ActionBegin(ActionEventArgs<Order> args)

    {

       

        if(args.RequestType == Syncfusion.Blazor.Grids.Action.Save && IsSave)

        {

            args.Cancel = true;

           

           

 

        }

 

    }


Reference: https://blazor.syncfusion.com/documentation/datagrid/events#onactionbegin


Please let us know if you have any concerns.


Regards,

Monisha


Marked as answer

DR Dragan December 4, 2022 01:56 PM UTC

Thanks



MS Monisha Saravanan Syncfusion Team December 5, 2022 04:05 AM UTC

Hi Dragan,


Welcome. Kindly get back to us if you have further queries. As always we will be happy to help you.


Loader.
Up arrow icon