BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi,
I am having a problem with the Calendar control.
When my data is changing I cannot find a way to reload the calendar, so that the CellTemplates are reloaded as well. It works only when I change the current month on the UI, but not the current visible month.
Another issue is, that I don't find a way to set the current visible month programmatically. What would you suggest to achieve this.
Hope you can help me. Thanks.
Enrico
Hi Enrico,
Thank you for using Syncfusion products.
We can change the current visible month programmatically by modifying the DisplayDate property of Calendar control.
Please find the sample from the following location,
In the above sample we have modified the DisplayDate property to display the current month has June.
Please let us know whether the sample assists your requirement.
Regards,
Mageshyadav.M
Hi,
But How I can Reload CellTemplates if the data for the current month change?
Thanks
Daniele
Hi Daniele,
We have prepared a sample to achieve your requirement. In the sample we have modified the CellTemplate property and called SfCalendar.Refresh() method to reload the cell template.
Please let us know whether the provided sample meets your requirement.
Regards,
Thanks for the example.
I have another question now.
Could you modify the same example adding a button which delete appointments?
So if I click on the Refresh button the calendar should remove only the appointment deleted,
because this is my scenario.
Thanks again
Daniele.
Hi Daniele,
Thanks for your update.
We have prepared a sample to meet your requirement. In the sample we have removed the appointments based on DateTime from AppointmentSource dictionary and refreshed the SfCalendar using Refresh() method.
Please let us know whether the provided sample meets your requirement.
Regards,
Thanks Victory,
this solution meets my requirements.
Thanks a lot
Daniele.