Scheduler in stepper don't show newly loaded event

Hello everyone!

I'm facing a problem using a scheduler in a stepper,

When I change the displayed week, the onloaddata fonction is called, I checked the debugger, the binded variable with my scheduler has the new data in it, but the scheduler don't show the newly added appointments, I tried to do this outside the stepper and it works well!

Here's my scheduler code

        <RadzenScheduler @ref="@Scheduler" TItem="Evenement"
                         Data="@Evenements" TextProperty="FullText"
                         StartProperty="Debut" EndProperty="Fin" 
                         SlotSelect=@SlotSelect AppointmentSelect=@AppointmentSelect
                         SlotRender=@OnSlotRender AppointmentRender=@OnAppointmentRender
                         LoadData="@OnLoadData" style="height: 540px;">


Here's my load data fonction:


async Task OnLoadData(SchedulerLoadDataEventArgs args)
    foreach (Agent agent in Evenement.Agents)
        List<Evenement> Events = (await Bll.GetEvenementsByDateAndAgentAsync(args.Start, args.End, agent.Id)).ToList();
        foreach(Evenement e in Events)
            if(!Evenements.Any(evt => evt.Id == e.Id ))


What happens is that it shows an empty week,

And I need to go back to the previous week and back to this week for the appointments to be displayed instantly,

Do you know why is that?

Thanks a lot!


You may need to call the Reload method of the scheduler instance.


I already tried that but calling await scheduler.Reload() in the OnLoadData Method lead the function into looping, calling it again and again,

Then do this at the end of the LoadEvent handler:

Evenements = Evenements.ToList();

This will create a new instance of the collection and the scheduler will know it has changed.

1 Like

Thanks a lot! It works!