This is a migrated thread and some comments may be shown as answers.

Binding

7 Answers 49 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthew
Top achievements
Rank 1
Matthew asked on 22 Feb 2013, 04:02 PM
Is there a way to set the Calendar control to bind to a DataTemplate ?

7 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 27 Feb 2013, 08:51 AM
Hello Matthew,

Thank you for your interest in RadCalendar.

RadCalendar has an ItemTemplate property which you can use to alter the appearance of the days. There is also an ItemTemplateSelector property which allows you to define different templates for different days. More information is available here.

Let me know if you need additional assistance.

All the best,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Matthew
Top achievements
Rank 1
answered on 27 Feb 2013, 11:04 AM
oops Typo !

I actually meant DataContext (a database)
0
Todor
Telerik team
answered on 28 Feb 2013, 01:19 PM
Hello Matthew,

One of the features of RadCalendar is that it can be used to display appointments. This can be done by setting AppointmentSource property to a static collection of appointments or by using data binding. You can have a look at our Examples solution which demonstrates most of the capabilities of RadCalendar so that you can get a better idea of how to use this control.

Greetings,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Matthew
Top achievements
Rank 1
answered on 28 Feb 2013, 03:51 PM
I have look in Demos - RadControls for Windows Phone 7 Q3 2012 SP2 Sample but see no examples of data binding.  Could you provide a link please?
0
Todor
Telerik team
answered on 01 Mar 2013, 01:22 PM
Hi Matthew,

I have attached a sample where the Calendar is bound to a collection of appointments.

Regards,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Matthew
Top achievements
Rank 1
answered on 01 Mar 2013, 01:53 PM
Yes I have seen that sample, though I fail to see the use of hardcoding appointments.  On WP they should be persisted in a database and the calendar control bound to said database IMO.

Do you have a method to do this?
0
Todor
Telerik team
answered on 01 Mar 2013, 02:10 PM
Hello Matthew,

The sample shows how to bind the calendar to a collection of appointments. Populating the collection is up to you. If you prefer, you can populate it from a database, from a service, hardcode the values, etc. We don't have a way to bind the calendar directly to a database, but you can easily change the FetchData method in the sample in order to get the appointments from your database instead of using our hardcoded values. The samples that we provide demonstrate the properties, methods and behavior of our controls in general use-case scenarios and don't emphasize on general development principles like polling data from a database.

Regards,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Calendar
Asked by
Matthew
Top achievements
Rank 1
Answers by
Todor
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or