Vertical Day Ruler in WeekView

9 posts, 1 answers
  1. Anastasios
    Anastasios avatar
    16 posts
    Member since:
    May 2010

    Posted 04 May 2010 Link to this post

    Hi,

    I have a question about the  Week view layout in radScheduler.
    I want a day ruler in place of the time ruler. How can I do it?
    If such functionality doesn't exist,is there a way to implement it? ( which part to alter etc)

    Thank you

  2. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 05 May 2010 Link to this post

    Hi Anastasios,

    Thank you for contacting me. Unfortunately, there is no sample way to change the orientation of the ruler text. But you could follow the step bellow to implement it.

    1. Create a class that inherit RulerRenderer and override its method RenderHour
     
    public class Renderer : RulerRenderer
    {
        public Renderer(RulerPrimitive ruler) : base(ruler)
        {
        }
     
        public override void RenderHour(Telerik.WinControls.Paint.IGraphics g, int hour, Rectangle bounds)
        {
            using (StringFormat sf = new StringFormat())
            {
                Font font = new Font( this.ruler.Font.FontFamily, 12);
     
                g.DrawString(hour.ToString(), bounds, font, this.ruler.ForeColor, ContentAlignment.MiddleCenter, sf, Orientation.Vertical, false);
            }
        }
    }

    2. Apply an instance of this class to the view element (do this only for day view, week view or workweek view)
     
    SchedulerDayViewElement dayViewElement = this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement;
    dayViewElement.DataAreaElement.Ruler.RulerRenderer = new Renderer(dayViewElement.DataAreaElement.Ruler);

    I hope this will help. If you have additional questions feel free to ask.

    Kind regards,
    Dobry Zranchev
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Anastasios
    Anastasios avatar
    16 posts
    Member since:
    May 2010

    Posted 05 May 2010 Link to this post

    Thank you very much for your help.
    I think that you have misunderstood what I am trying to do.Actually it is my fault because I didn't explain it right.
    I want the day ruler (not the text inside it,but the whole ruler) to be placed in the position of time ruler.In the left side,vertically oriented.
    Then in advance, I will try to order vertically the appointments. (To make it more clear,imagine the appointments table flip 180 by left)


    Thank you very much again and sorry for my bad English.
  5. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 05 May 2010 Link to this post

    Hello Anastasios,

    We do not provide such functionality out of the box. You can try the following workaround, but we think that it will not meet your requirements:
     
    this.radScheduler1.SchedulerElement.AngleTransform = 90;

    We will try to add this feature in a future release.

    All the best,
    Dobry Zranchev
    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.
  6. Anastasios
    Anastasios avatar
    16 posts
    Member since:
    May 2010

    Posted 06 May 2010 Link to this post

    Thank you very much Dobry

    Unfortunately, as you said,the workaround doesn't meet the requirements I have.
    Is there a way so I can implement it? (Which class to overload etc)
    I will be grateful if you can give me a hint :)

    Thank you very much for your support

  7. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 06 May 2010 Link to this post

    Hi Anastasios,

    As already discussed, the requested functionality is not available in the RadScheduler control. However, since we find this case interesting, we may consider implementing it for one of our next releases.

    Thanks for the understanding.

    Do not hesitate to contact us if you have further questions.

    Greetings,
    Dobry Zranchev
    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.
  8. Anastasios
    Anastasios avatar
    16 posts
    Member since:
    May 2010

    Posted 06 May 2010 Link to this post


    Thank you again Dobry for your help.

    Just one more thing :)
    Because I'm new to the rad controls,is there any other control that I can use/combine with radScheduler to achieve such functionality?

    UPDATE: Just another thought: Maybe I can combine many flipped radSchedulers in Dayview mode.The only problem is, that as I know,
    drag 'n' drop between radSchedulers isn't provided by now.

  9. Answer
    Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 10 May 2010 Link to this post

    Hi Anastasios,

    Although there is no way to rotate the scheduler out of the box the way you need it, your suggestion about using flipped radSchedulers in Dayview mode may be feasible. You can add drag and drop between two or more schedulers by implementing the standard OLE drag and drop approach. Please, follow the example that we provide with the installation package (QSF -> Scheduler -> Drag&Drop example).
     

    Sincerely yours,
    Dobry Zranchev
    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.
  10. Anastasios
    Anastasios avatar
    16 posts
    Member since:
    May 2010

    Posted 10 May 2010 Link to this post

    Thank you very much Dobry for your help
Back to Top
UI for WinForms is Visual Studio 2017 Ready