We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Calendar Control - reload CellTemplates

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

 


6 Replies

MM Mageshyadav M Syncfusion Team May 14, 2013 12:18 PM UTC

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,

 

http://www.syncfusion.com/downloads/Support/DirectTrac/General/CalendarCellTemplateSample-1478123481.zip

 

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



DA Daniele January 9, 2014 01:35 PM UTC

Hi,

But How I can Reload CellTemplates if the data for the current month  change?


Thanks

Daniele



VJ Victory Jessie Selvam D Syncfusion Team January 13, 2014 11:21 AM UTC

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,

Victory


CalendarCellTemplateSample_c7347134.zip


DA Daniele January 15, 2014 05:10 PM UTC

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.



VJ Victory Jessie Selvam D Syncfusion Team January 16, 2014 11:06 AM UTC

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,

Victory


Calendar_3cfca803.zip


DA Daniele January 16, 2014 04:37 PM UTC

Thanks Victory,

this solution meets my requirements.


Thanks  a lot

Daniele.



Loader.
Live Chat Icon For mobile
Up arrow icon