Refresh CalendarButtons.

4 posts, 0 answers
  1. Ryan
    Ryan avatar
    18 posts
    Member since:
    Oct 2010

    Posted 06 Dec 2010 Link to this post

    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.
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 08 Dec 2010 Link to this post

    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
  3. DevCraft banner
  4. Ryan
    Ryan avatar
    18 posts
    Member since:
    Oct 2010

    Posted 08 Dec 2010 Link to this post

    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?
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 10 Dec 2010 Link to this post

    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
Back to Top