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

Refresh CalendarButtons.

3 Answers 127 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 06 Dec 2010, 10:41 PM
Hello. I have templated a RadCalendar control to add some functionality. One of the additions is a usercontrol which is inside of a CalendarButton on the DayButtonStyle. It has 2 textboxes which are bound to some information about that day. I believe that I have all of the bindings and valueconverters setup correctly; that is the correct data initially goes to the valueconverter and is then processed and displayed correctly.

The issue I have is that when the data is updated, the control does not refresh. My PropertyChanged events fire for each of the text fields in my control, but the neither the control nor the button overall update. I know this because my valueconverter is not running. The only time my control does update is when I click on the next or previous month buttons. This causes the whole calendar to update, and every calendar button refreshes itself, updating my control with the current data.

This isn't helpful for 2 reasons. First it requires the user to change the month before any data is displayed. Secondly, the data which is being displayed is dependent on what month is showing. So, if the user is looking at November, and then clicks the "next month" button, the information for November will be loaded, but it will not display since the calendar is displaying December.

Long story short, how do I force either an individual button to refresh, or the entire calendar to refresh without changing the displayed month? Either of these (a day or the whole thing) is acceptable.

3 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 08 Dec 2010, 10:31 AM
Hello Ryan,

I would kindly ask you to send us a test project with set binding and styles. That way we can determine the real issue that has lad to a not working binding.

Best wishes,
Kaloyan
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ryan
Top achievements
Rank 1
answered on 08 Dec 2010, 05:31 PM
Perhaps I was not clear. My bindings are fine. The issue is with the refresh of the calendar. The calendar buttons do not refresh themselves when a child control fires a Property Changed event. They do refresh themselves when the user manually navigates to the next or previous month. However, only after the calendar is refreshed do my child user controls update, at which point their values differ from what should be on the screen.

I need to force from code a refresh of either the individual calendar buttons (and their child objects) or the entire RadCalendar control. There is obviously already some event handler in place which does this for the whole calendar, because it is triggered when the month changes. What is that event handler, and how can I trigger it on demand?
0
Kaloyan
Telerik team
answered on 10 Dec 2010, 10:05 AM
Hi Ryan,

Now I am getting your case. Unfortunately the behavior you are describing is missing in the current version of the control. The task is in our priority list and its development will start soon.

Regards,
Kaloyan
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Calendar
Asked by
Ryan
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or