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

Update binding i RadCalendar control

3 Answers 90 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.
Mikael
Top achievements
Rank 1
Mikael asked on 09 Jan 2013, 02:15 PM

I have an RadCalendar Control which I initially only loads with the current month. When the user swipes to another month, I make a call, and update the control.

However, the new month does not get populated, unless I click on a date, or go back to the previus month, and then back again.
Here is the code I use:

calendar.AppointmentSource = App.ViewModel.CalendarViewModel;

calendar.UpdateLayout();


If this is a bug, are there any known workarounds?
Regards
Mikael

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 14 Jan 2013, 11:52 AM
Hi Mickael,

Thank you for writing.

We are not aware of a similar issue. You can have a look at our Examples solution and/or the design template for the calendar, which you can find in the New Telerik Item wizard. In the example/template we demonstrate how to use the appointments in the calendar itself and also how to visualize them with RadDataBoundListBox. I hope this will help you adjust your setting and successfully populate the data. If this doesn't help you, I encourage you to open a new support ticket in order to attach a solution which can helps better identify the issue that you experience and find the cause for it.

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
Mikael
Top achievements
Rank 1
answered on 12 Feb 2013, 10:46 PM
Sorry for the late reply, but I have a bit more information. It appears to be related to my custom DataTemplateSelector. The selector works fine, but it doesn't get triggered when the datacontext and/or AppointmentSource is updated.

Is there a manual way to trigger this to happend?
0
Todor
Telerik team
answered on 15 Feb 2013, 01:04 PM
Hello Mikael,

The template selector gets triggered when the DisplayDate or the SelectedValue get changed. However, if you change the SelectedValue the template will be evaluate only for the old and the new value of this property. If you need to reload the whole month, you can change the DisplayValue with something similar to this:
calendar.DisplayDate = calendar.DisplayDate.AddMonths(1);
calendar.DisplayDate = calendar.DisplayDate.AddMonths(-1);

I hope this information helps.

Kind 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
Mikael
Top achievements
Rank 1
Answers by
Todor
Telerik team
Mikael
Top achievements
Rank 1
Share this question
or