difference between edit event and following events in OnPopUpOpen function in custom editor template
Hello, im working in blazor syncfusion ( syncfusion.blazor 29.2.4 ) sfscheduler and i found feature following events in https://blazor.syncfusion.com/demos/scheduler/recurrence-events?theme=bootstrap5.3 . When i click edit event in demo, repeat part of popup is hidden and on buttons edit series and following events isnt . i would like to impletment that feature but I have my own editor template and i need to find difference between buttons edit event and following events in function OnPopUpOpen cause when i click on edit event i want RecurrenceRule to be null and Recurrencelabel to be empty and also i have boolean that will hide repeat parts of popup. Btw. before i found out about following events the difference between edit event and edit series was that RecurrenceID has value if i click on edit event and doesnt have if i click on edit series.
Best regards,
Ivan Parmač
Hi
ivan parmac,
we
have checked and reviewed your reported query for your requirement. Edit Event
refers to a single occurrence where RecurrenceID is set and both RecurrenceRule
and FollowingID are null. Following Events creates a new sub-series from the
selected occurrence with FollowingID set and a RecurrenceRule present. Edit
Series targets the parent item where the RecurrenceRule is set and both
RecurrenceID and FollowingID are null. To detect Edit Event in OnPopUpOpen,
check that RecurrenceID is not null and FollowingID is null. To detect
Following Events in OnPopUpOpen, check that FollowingID is not null. To detect
Edit Series in OnPopUpOpen, ensure RecurrenceRule is not null while
RecurrenceID and FollowingID are null. For Edit Event set RecurrenceRule to
null, clear RecurrenceLabel, and set ShowRepeat to false; for Following Events
keep RecurrenceRule and RecurrenceLabel and set ShowRepeat to true; for Edit
Series use the parent data and set ShowRepeat to true.
Regards,
Vijay
Hi Vijay Ravi,
here is my code (from original code in demo it only differs in OnPopupOpen ):
@using Syncfusion.Blazor.Schedule
@using Syncfusion.Blazor.Buttons
<div class="col-lg-12" style="padding-top:15px">
<div class="form-row">
<SfCheckBox @bind-Checked="@EditUpcoming" Label="Enable Following Events" title="Show option to edit and delete the following events of a recurrence series."></SfCheckBox>
</div>
</div>
<div class="col-lg-12 control-section">
<SfSchedule TValue="ScheduleData.AppointmentData" Width="100%" Height="650px" @bind-SelectedDate="@CurrentDate" @bind-CurrentView="@CurrentView">
<ScheduleEvents TValue="ScheduleData.AppointmentData" EventRendered="OnEventRendered" OnPopupOpen="OnPopupOpen"></ScheduleEvents>
<ScheduleViews>
<ScheduleView Option="View.Day"></ScheduleView>
<ScheduleView Option="View.Week"></ScheduleView>
<ScheduleView Option="View.Month"></ScheduleView>
</ScheduleViews>
<ScheduleEventSettings DataSource="@dataSource" AllowEditFollowingEvents="@EditUpcoming"></ScheduleEventSettings>
</SfSchedule>
</div>
@code {
public View CurrentView { get; set; } = View.Week;
private DateTime CurrentDate { get; set; } = new DateTime(DateTime.Today.Year, 1, 12);
private bool EditUpcoming { get; set; } = false;
private List<ScheduleData.AppointmentData> dataSource = new ScheduleData().GetRecurrenceData();
public void OnEventRendered(EventRenderedArgs<ScheduleData.AppointmentData> args)
{
args.Attributes = ScheduleData.ApplyCategoryColor(args.Data.CategoryColor, args.Attributes, CurrentView);
}
private void OnPopupOpen(Syncfusion.Blazor.Schedule.PopupOpenEventArgs<ScheduleData.AppointmentData> args)
{
if (args.Type == PopupType.Editor)
{
var arguments = args;
var jsonArgs = JsonSerializer.Serialize(args.Data);
}
}
}
<style>
.fabric .e-dialog .e-footer-content .e-btn,
.fabric-dark .e-dialog .e-footer-content .e-btn {
margin-left: 0px;
}
</style>
lets say i click on Scrum Meeting on wednesday 15.01.2025,after that i click on pen to edit like on upper part of picture.
In popup I can see 3 buttons like on bottom part of picture: I would like to know how you make difference between buttons EDIT EVENT and FOLLOWING EVENTS because for both buttons i get same object -> in both cases RecurrenceID and RecurrenceRule are not null and FollowingID is null:
'{"Id":2,"Subject":"Scrum Meeting","Location":"Office","Description":"Daily work plan discussion","StartTime":"2025-01-15T09:30:00","EndTime":"2025-01-15T10:30:00","IsAllDay":null,"CategoryColor":"#357cd2","RecurrenceRule":"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1","RecurrenceID":2,"FollowingID":null,"RecurrenceException":null,"StartTimezone":null,"EndTimezone":null}' .
Best regards,
Ivan Parmač
Attachment: ssf_54ed8e45.png
Hi
ivan parmac,
We have reviewed and validated your query against your requirements. In the Editor popup, args.Data is the same for both Edit Event and Following Events; the FollowingID value is generated only after the item is saved, so these actions cannot be distinguished at that stage. Instead, differentiate after saving in OnActionBegin/OnActionComplete (EventChange): if FollowingID is not null, it indicates Following Events; if RecurrenceID is not null and FollowingID is null, it indicates Edit Event. For Edit Series, RecurrenceRule is not null while both RecurrenceID and FollowingID are null.
Don't hesitate to get in touch if you require further help or more information.
Regards,
Vijay
- 3 Replies
- 2 Participants
-
IP ivan parmac
- Nov 20, 2025 02:57 PM UTC
- Nov 26, 2025 12:07 PM UTC