Day and Week view - worktime

2 posts, 0 answers
  1. Vicenc Masanas
    Vicenc Masanas avatar
    38 posts
    Member since:
    Jul 2007

    Posted 09 Mar 2010 Link to this post

    I've been looking at the documentation and samples and couldn't find any place where this is showed so I'm not sure this is possible. Can anyone confirm?

    1. Display non continous worktime. For example from 8-14 and from 15-18. So noting that 14-15 is lunch time.

    2. When you use the week view, and are on the right most day, it's very difficult to notice when are the hour frames. You just see a bunch of lines and nothing different on them, so it makes very difficult to clearly understand what timeframe are you selecting (we are using 15min default view). I'd like to mark the "hours" line stronger so it's a bit easier to get where you are.
    Another option would be to display the time range on both the left and right sides of the scheduler.

    Thank you,
    Vicenç Masanas
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 12 Mar 2010 Link to this post

    Hello Vicenc Masanas,

    Thank you for contacting us.

    1. This feature is not implemented yet. You can only set a start and end time for the WorkTime object.
    2. Unfortunately, this is not supported in RadScheduler too. We will do our best to improve the UI logic for the next release and make this feature available. At the moment, you can modify the drawing logic of the "Ruler part" of RadScheduler.
    This code snippet will modify the ruler width:
    SchedulerDayViewBase dayViewBase = this.radScheduler.ActiveView as 
    SchedulerDayViewBase;dayViewBase.RulerWidth = 70;

    You can also create a custom rendering logic by doing the following:
    SchedulerDayViewElement dayView=this.radScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
    RulerPrimitive ruler = 
    ruler.RulerRenderer = new 

    The code snippet above sets a custom RulerRenderer class to be used instead of the default one.

    Here is the code snippet with the implementation of RulerRendererEx class:
    public class RulerRendererEx : RulerRenderer{
    public RulerRendererEx(RulerPrimitive ruler) : base(ruler){
    public override void RenderHour(Telerik.WinControls.Paint.IGraphics g, int 
    hour, Rectangle bounds){

    base.RenderHour(g, hour, bounds);
    Color color 
    = Color.FromArgb(141, 174, 217);
    g.DrawLine(color, bounds.X + bounds.Width / 
    4, bounds.Y, bounds.Right, bounds.Y);
    g.DrawLine(color, bounds.X + 
    bounds.Width / 4, bounds.Y + 1, bounds.Right, bounds.Y + 1);}

    RulerRendererEx class draws 2 lines which makes the hour scales to become bold.

    I hope this helps. 

    Boyko Markov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top