How to prevent the action on save button in each dialog frame

I would like to prevent the action on save button to stop adding/editing/deleting record in gantt.

Because I want to add them after some response 200 from server,so I need cancel action on button in dialog frames,and add the recodrds manually after this response.

1.PNG 2.PNG


3 Replies 1 reply marked as answer

GM Gopinath Munusamy Syncfusion Team September 29, 2022 09:49 AM UTC

Hi Nurbek,


Greetings from Syncfusion support.

We have checked your query and we have prepared a work around sample to achieve your requirement. In this sample, we have prevented the add, edit and delete action using actionBegin Event using the requestType of beforeAdd, beforeSave and beforeDelete. Based on the condition, we can able to prevent the save actions by setting the value of args.cancel to true. We have attached a sample and code snippets for your reference, please check the below sample and code snippets for more details.

Code snippets:

[App.vue]

actionBegin(args) {

            if(args.requestType == "beforeAdd" || args.requestType == "beforeSave"

            || args.requestType == "beforeDelete"){

              args.cancel = true;

            }  

},


Sample: https://www.syncfusion.com/downloads/support/forum/177765/ze/VueGantt_Dialog708508928.zip


Regards,

Gopinath M


Marked as answer

NU Nurbek replied to Gopinath Munusamy September 29, 2022 12:19 PM UTC

Hello .

Thanks for answer.It's funny guys before I wrote you I checked the args of any action of actionBegin through console and there wasn't any kind of cancelation.


Regards





GM Gopinath Munusamy Syncfusion Team September 30, 2022 05:09 AM UTC

Hi Nurbek,


You’re most welcome. Please get back to us if you require any further assistance.


Regards,

Gopinath M


Loader.
Up arrow icon