settings AllAppointments Source

2 posts, 0 answers
  1. Denny
    Denny avatar
    1 posts
    Member since:
    Feb 2013

    Posted 09 May 2013 Link to this post

    If I wanted to use the structure that is supplied in the example source code for the calendar controls, how would I set the StartDate and EndDate for scheduled events?

    If I use the StarteDate = DateTime.Now
                    EndDate = DateTime.Now.addHours(1)

    Isn't this always going to use the current system time for the start time and then add 1 hour for the end date?

    I want to set the schedule to stick to a particular date. Such as May 20, 2013. So that no matter when the user looks at the calendar the May 20,2013 appointment will always be on the schedule.

    I know I can load a XML file or whatever other source, I'm just trying to get a feel for the controls and make sure the way I want the event to look..

    And also if I did want to use a XML file would I point the public SampleAppointmentSource() to the XML? and would that be a navigationService?


  2. Todor
    Todor avatar
    773 posts

    Posted 14 May 2013 Link to this post

    Hi Denny,

    Thank you for contacting us.

    I have attached a sample where the appointments are created dynamically, which I believe you can find useful. If you want to have the appointments in an XML, text or other type of file, you can read the content of the file and parse it somewhere inside the SampleAppointmentsSource constructor or inside the MainViewModel. Then you can add the parsed DateTime objects to the AllAppointments collection. Neither StartDate, nor EndDate have to be related to DateTime.Now. You can create whatever DateTime objects you need.

    All the best,
    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
Back to Top