This is a migrated thread and some comments may be shown as answers.

Multiple clicks on "Save" button in Scheduler Editor popup result in multiple appointments created in Database

1 Answer 215 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Denis Buchwald
Top achievements
Rank 1
Denis Buchwald asked on 05 Sep 2017, 03:50 PM

I was able to reproduce this problem in your online demo page:

https://demos.telerik.com/aspnet-mvc/scheduler

When clicked on "Save" button multiple times, duplicate calendar entries are created in database. How to prevent that?

Screenshot attached.

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 07 Sep 2017, 01:32 PM
Hello,

Possible approach to prevent saving duplicate data on clicking the 'Save' button multiple times is to hide the button after it is clicked. To achieve this, you should attach to the save event.

.Events(e =>
  {
    e.Save("onSave");
  })

And in the save event handler, the save button could be hidden with the following code: 
function onSave(e) {
 var btn = $('.k-scheduler-update');
 $(btn).hide();     
}

Regards,
Neli
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Denis Buchwald
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or