We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Create, edit and delete events

Thread ID:

Created:

Updated:

Platform:

Replies:

129531 Mar 23,2017 02:14 PM Mar 30,2017 12:18 AM ASP.NET MVC 7
loading
Tags: Schedule
Laura Jordan
Asked On March 23, 2017 02:14 PM

Hi,

I am using the Schedule control and I want to create, edit an delete events. Could you help me to implements these functionalities?

Really appreciate the support,

Thanks

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 24, 2017 03:25 AM

Hi Laura, 
 
Thank you for contacting Syncfusion support. 
 
We suspect that your requirement is to implement CRUD functionalities in Scheduler and for the same we have prepared the sample which can be download from the below link. 
 
In the sample when an appointment is added/edited/deleted, it will be reflected in the data base too. Kindly refer the below code example used in the sample. 
 
<Code> 
@(Html.EJ().Schedule("Schedule1") 
        .Width("100%") 
        .Height("525px") 
        .CurrentDate(new DateTime(2016, 10, 29)) 
        .AppointmentSettings(fields => fields.Datasource(ds => ds.URL("/Home/GetData").CrudURL("/Home/Batch").Adaptor("UrlAdaptor")) 
        .ApplyTimeOffset(false) 
                .Id("Id") 
                    .Subject("Subject") 
                    .StartTime("StartTime") 
                    .EndTime("EndTime") 
                    .AllDay("AllDay") 
                    .Recurrence("Recurrence") 
                    .RecurrenceRule("RecurrenceRule")) 
) 
 
</Code> 
 
Regards, 
Karthigeyan 
 
 


Laura Jordan
Replied On March 27, 2017 12:00 PM

Hi,

I am facing an issue when trying to create an event by single clicking...I am getting the Subject value as NULL, because does not show the option of setting a subject.

Also I want to disable the Recurrence option when created an event.

Can you help me? 

Thanks for the support,

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 28, 2017 06:40 AM

  
Thanks for your update.  
 
Before opening an appointment window, AppointmentWindowOpen event will be raised where the default window can be customized. Kindly include the below code example in your sample to disable the recurrence option in the appointment window. We have prepared the below sample for your easy reference in JS platform. 
 
<Code> 
.ScheduleClientSideEvents(evt=> 
   evt .AppointmentWindowOpen("onAppointmentWindowOpen")) 
 
function OnAppointmentWindowOpen(args) {   
        $("#" + this._id + "recurrence").ejCheckBox("disable"); 
        $(".e-repeatlbl").closest('td').addClass("e-disable"); 
    } 
</Code> 
 
We are not clear about your first requirement, kindly share the image/video demo which clearly depicts the issue to proceed further. 
 
Regards,  
Karthigeyan  
 
 


Laura Jordan
Replied On March 28, 2017 02:33 PM

Hi,

Thanks for the update, but when I double click any Schedule cell to create an event it still appear the Repeat checkbox option. I want to disable that option for the user when try to create an appointment by clicking or double clicking.

Best regards.

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 29, 2017 01:33 AM

   
Thanks for your update   
   
In our previous sample, recurrence option (Repeat field) is disabled in appointment window as per your requirement and for the same we have prepared the below video demo. Kindly ensure that previous update code example is used in your example and if your requirement is to hide the recurrence option (Repeat field) in appointment window, kindly use the below code example and for the same below sample is prepared.   
 
<Code> 
.ScheduleClientSideEvents(evt=>  
       evt .AppointmentWindowOpen("onAppointmentWindowOpen"))  
  
function OnAppointmentWindowOpen(args) {   
            $("#"+this._id+"recurrence").closest('td').css("display","none"); 
            $(".e-repeatlbl").closest('td').css("display","none"); 
        } 
</Code> 
 
If the above sample doesn’t meet your requirement, kindly share the image/video demo which clearly depicts your requirement to proceed further.   
   
Regards,   
Karthigeyan   


Laura Jordan
Replied On March 29, 2017 02:45 PM

Hi,

Thanks for the support, I notice that the problem was the name of  the event function.
In the first example the code function name was .AppointmentWindowOpen("onAppointmentWindowOpen")). But in the javascript code it was OnAppointmentWindowOpen so it did not match. Now I change it, and it works as expected.

Best regards.

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 30, 2017 12:18 AM

    
We are happy that our solution has fulfilled your requirement. 
 
Please let us know if you need further assistances.  

Regards, 
Karthigeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;