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
close icon

Dynamic DataBinding with SfCalendar

Hi I'm using the calendar component and what I'm not be able to do

is to bind the calendar to a ObservableCollection property of the ViewModel of the page.

The type of the  ObservableCollection will be a custom type and one attribute of the custom type

will be showed in the cells of the calendar with the number of the day.

The ObservableCollection is populated from a database and if I add,modify or remove an item in the ObservableCollection the calendar must be updated automatically because the ViewModel of the page implement the INotifyPropertyChanged interface.

Is there a way to have this scenario?


Thanks

Daniele



 


3 Replies

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

Hi Daniele,

 

Your requirement cannot be achieved with SfCalendar control.

 

SfCalendar control is derived from Control class, it doesn't support binding any collection to generate the content. Calendar view is updated with DateTime source internally in our source project and there is no possibility to change it from sample.

 

Please let us know if you need further assistance.

 

Regards,

Victory


DA Daniele January 15, 2014 08:37 AM UTC

So, If I have understood well  If I want that the user delete some appointment I have to refresh the page to see the calendar updated?

Thanks

Daniele



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

Hi Daniele,

 

Thanks for your update.

 

Query: So, If I have understood well  If I want that the user delete some appointment I have to refresh the page to see the calendar updated?

 

Yes you need to refresh the SfCalendar with Refresh() method when the user delete some appointment to see the Calendar updated.

 

Regards,

Victory

Loader.
Live Chat Icon For mobile
Up arrow icon