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. Image for the cookie policy date

Modify schedule field values when adding a new event

Hi,
I'm adding an event with an EditorTemplate, is there a way to change the value dynamically of the context fields (subject, description etc.)? For example, after the EditorTemplate popsup and I enter the info and press Save, I want to then programmatically change some of those values. Any idea?

Thanks,
Joe

3 Replies

NR Nevitha Ravi Syncfusion Team November 19, 2019 06:26 AM UTC

Hi Joe, 

Greetings from Syncfusion Support. 

We can modify the field values dynamically after pressing save button using OnActionBegin event which will trigger before each CRUD actions and navigation action takes place and for the same we have prepared a sample for your reference which can be downloaded from the following link. 


    public void OnActionBegin(ActionEventArgs<AppointmentData> args) 
    { 
        if (args.RequestType == "eventCreate") 
        { 
            foreach(AppointmentData data in args.AddedRecords) 
            { 
                data.Subject = "Subject Changed"; 
            } 
        } 
    } 

Please try out the sample and get back to us if you need any further assistance. 

Regards, 
Nevitha 



JS Joe Smith November 20, 2019 07:39 PM UTC

Thanks Nevitha, that did it! Appreciate the quick help.


NR Nevitha Ravi Syncfusion Team November 21, 2019 05:43 AM UTC

Hi Joe, 
  
You are most Welcome. Please keep in touch for further assistance. We are always happy in assisting you. 
  
Regards, 
Nevitha 


Loader.
Live Chat Icon For mobile
Up arrow icon