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

Problems with RulerScaleSize in weekview

2 Answers 75 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Art
Top achievements
Rank 1
Art asked on 10 Jan 2011, 09:16 PM
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.

Later
Art

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 12 Jan 2011, 01:12 PM
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.
Regards,
Richard
0
Dobry Zranchev
Telerik team
answered on 13 Jan 2011, 02:09 PM
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.

Regards,
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.
Tags
Scheduler and Reminder
Asked by
Art
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Dobry Zranchev
Telerik team
Share this question
or