What Event to use to catch the AllowInline="true"

Hi,

In the examples I found this one for inline editing by setting AllowInline to true.


Works great, but which event is fired after editing so I can update the DB accordingly?

Thanks in advance!

3 Replies 1 reply marked as answer

NR Nevitha Ravi Syncfusion Team January 28, 2021 05:29 AM UTC

Hi Andre, 

Greetings from Syncfusion Support. 

You can use OnActionBegin event which will trigger while performing CRUD actions, please refer to the following sample. 

     
<SfSchedule TValue="AppointmentData" Height="550px" AllowInline="true" @bind-SelectedDate="@CurrentDate"> 
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings> 
    <ScheduleEvents TValue="AppointmentData" OnActionBegin="OnActionBegin"></ScheduleEvents> 
</SfSchedule> 
 
 
   public void OnActionBegin(ActionEventArgs<AppointmentData> args) 
    { 
        if (args.AddedRecords != null && args.AddedRecords.Count > 0) 
        { 
            //triggers when add appointments 
        } 
        if (args.ChangedRecords != null && args.ChangedRecords.Count > 0) 
        { 
            //triggers when update appointments  
        } 
        if (args.DeletedRecords != null && args.DeletedRecords.Count > 0) 
        { 
            //triggers when remove appointments 
        } 
    } 


Please try the sample and let us know if you need any further assistance. 

Regards, 
Nevitha 


Marked as answer

AS Andre Speek January 29, 2021 09:54 AM UTC

Hi Nevitha,

Yes, this works just fine! Great to see there is a distinction between the added, updated and deleted records too. 

Thanks so much for helping out!

Cheers,

Andre


VD Vinitha Devi Murugan Syncfusion Team February 1, 2021 07:42 AM UTC

Hi Andre, 
 
Thanks for your update. 
 
You are most welcome 😊 
 
Regards, 
Vinitha 


Loader.
Up arrow icon