Binding

8 posts, 0 answers
  1. Matthew
    Matthew avatar
    4 posts
    Member since:
    Feb 2013

    Posted 22 Feb 2013 Link to this post

    Is there a way to set the Calendar control to bind to a DataTemplate ?
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 27 Feb 2013 Link to this post

    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.
  3. DevCraft banner
  4. Matthew
    Matthew avatar
    4 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    oops Typo !

    I actually meant DataContext (a database)
  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 28 Feb 2013 Link to this post

    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.
  6. Matthew
    Matthew avatar
    4 posts
    Member since:
    Feb 2013

    Posted 28 Feb 2013 Link to this post

    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?
  7. Todor
    Admin
    Todor avatar
    778 posts

    Posted 01 Mar 2013 Link to this post

    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.
  8. Matthew
    Matthew avatar
    4 posts
    Member since:
    Feb 2013

    Posted 01 Mar 2013 Link to this post

    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?
  9. Todor
    Admin
    Todor avatar
    778 posts

    Posted 01 Mar 2013 Link to this post

    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.
Back to Top
DevCraft banner