Problems with RulerScaleSize in weekview

3 posts, 0 answers
  1. Art
    Art avatar
    54 posts
    Member since:
    Dec 2010

    Posted 10 Jan 2011 Link to this post

    I have a RadScheduler (RadScheduler1) set to weekview and setting the RulerScaleSize to 15, and the ShowWeekends set to false.  On the form I have a checkbox (chkShowEnds) for "Show Weekends", with the following code in it's click event.

    Dim weekview as SchedulerWeekVview = Me.RadScheduler1.GetWeekView()
    weekview.ShowWeekend = Me.chkShowEnds.Checked

    It set the ShowWeekends property, and the RadScheduler weekends appear and disappear correctly.  However, on the first click it sets the RulerScaleSize to some default setting of about 25 or so, and I can not seem to set it back to 15.  I tried testing around with setting the RulerScaleSize and it seems to set to a larger value, but not smaller ones.  It also seems to change the RulerScaleSize the first time, but not subsequent times.

    Any help woul dbe appreciated.

  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Jan 2011 Link to this post

    Hello Art,

    I managed to replicate your issue but at the moment I cannot offer a workaround. It seems as though as soon as the ShowWeekend is checked, it looses the size, unless you change to a different view, and then uncheck the show weekend again. If I can find a way around this I'll let you know.
  3. Dobry Zranchev
    Dobry Zranchev avatar
    349 posts

    Posted 13 Jan 2011 Link to this post

    Hello Art,

    Thank you for the report.

    I managed to reproduce the issue. It will be resolved in the next major release. Meanwhile, I can only give you a workaround that can be invoked on a specific user action, for example on a button click. I can not give you an appropriate event that can automatically update the RulerTimeScale. The following code snippet will update the rulers' properties according to the view properties.
    foreach (RulerPrimitive ruler in (this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement).DataAreaElement.Rulers)
        ruler.DefaultSeparatorOffset = this.radScheduler1.GetWeekView().RulerScaleSize;

    Your Telerik points are updated for the feedback.

    Thank you Richard for the community efforts.

    Dobry Zranchev
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top