RadSchedulerNavigator Show Weekend Persistence

2 posts, 1 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Mar 2016

    Posted 11 Mar Link to this post

    Hello, I am trying to get and set the state of the Show Weekend check box of a RadSchedulerNavigator paired with a RadScheduler, in order to save and restore user settings.

    I can access the RadCheckBoxElement from the navigator (ShowWeekendCheckBox), and I can manipulate the IsChecked property. The check box responds in kind, but whenever I switch from Week view to Month view and vice versa, the checkbox resets to the checked state. If the checkbox is checked manually, the state does persist when the active view type changes (e.g. checked for week view and unchecked for month view stay that way regardless of view changes).

    What should I do to really change the value of the check box?

    I am using Telerik WinForms version 2014.3.1104.40 with C# targeting .NET 4.0.
  2. Answer
    Dess avatar
    1562 posts

    Posted 15 Mar Link to this post

    Hello Daniel,

    Thank you for writing.

    When you change the active view in RadScheduler, a new SchedulerView is created if an already cached view of the same type does not exist. The ShowWeekend property is available at ISupportShowWeekend view level. Hence, when you change to MonthView for the first time, the ShowWeekend property is set to true because a new view is created. However, if you switch to another view and come back to MonthView, the ShowWeekend property will have the last value assigned to this view because of the cached value. That is why you can use the ActiveViewChanging to detect the ShowWeekend property value of the previous view and in the ActiveViewChanged event assign it to the new ISupportShowWeekend view.

    I hope this information helps. Should you have further questions I would be glad to help.
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top