Settings/Events not applied/showing until view change

Hello,

I am trying to figure out why my calendar displays the settings I have loaded but doesn't adjust the calendar to match, nor does it show any events until after I change the view.

When it opens:


After view change:


This is my code for onInitialized:

protected override async Task OnInitializedAsync()

    {

        await Task.Run(() => GetChurchIDAsync());

        EventsList = await Task.Run(() => GetEventsListAsync());

        LoadCalendarSettings();

    }

The Calendar settings I have saved in a table since multiple users will be using my program, I needed it to save the settings for each user and load them. The EventsList is the datasource for the scheduler.


5 Replies

RM Ruksar Moosa Sait Syncfusion Team February 28, 2022 08:02 PM UTC

Hi Andrew,


We have prepared a sample to reproduce your reported issue but unfortunately, we were unable to reproduce it.

Kindly try the attached sample and if the issue persists still share the below details to validate your reported issue and serve you better. 

  • Confirm the above sample is properly working at your end?
  • If possible, replicate the issue in the attached sample.
  • Share the issue replicating code (if possible) to validate further at our end.


We will be happy to assist you..!


Regards,

Ruksar Moosa Sait


Attachment: Overview_sample_3f7edbb1.zip


AN Andrew March 1, 2022 01:45 AM UTC

I got it to work while I was looking into the timezone process. I used this guide: https://blazor.syncfusion.com/documentation/scheduler/timezone and the section that showed how to do it based on client's time zone. I needed the

protected override async Task OnAfterRenderAsync(bool firstRender)

part and now it loads as expected. 

The only issue I'm having right now is that after I double click an appointment, I can't get the editor window to close with this:

ScheduleRef.CloseEditor();

I put a StateHasChanged after it but then it loops endlessly through my update code.




RM Ruksar Moosa Sait Syncfusion Team March 2, 2022 05:50 PM UTC

Hi Andrew,


Thanks for the update


To prevent opening of editor window on event double click, you can set args.Cancel to true and bind it to OnEventDoubleClick event like the below code snippet.


public void OnEventDoubleClick(EventClickArgs<AppointmentData>args)

    {

       args.Cancel = true;

    }


Kindly try the above solution and let us know if this meets your requirement.



Regards,

Ruksar Moosa Sait



AN Andrew March 2, 2022 06:32 PM UTC

Hello,

That's not what my issue is, it's the opposite actually.  I need to manually close the editor window and that's what I can't seem to get to work.


Thanks,

Andrew



RM Ruksar Moosa Sait Syncfusion Team March 3, 2022 07:01 PM UTC

Hi Andrew,


We have prepared a sample to manually close the Editor window on a button click. Kindly try the attached sample and let us know if you need further assistance.


Regards,

Ruksar Moosa Sait



Attachment: Close_editor_window_manually_5cd6b0d8.zip

Loader.
Up arrow icon