RadScheduler: show text to left of daily-view appointments

4 posts, 0 answers
  1. Philip
    Philip avatar
    7 posts
    Member since:
    Sep 2012

    Posted 12 Aug 2013 Link to this post

    #1
    On the RadScheduler, AddDay appointments are displayed at the top ... above appointments with appointment times.  Appointments with times show the times on the very left of the control.  AllDay appointments do not show the appointment times ... that space is blank.  Do I have access to that area?  How can I draw vertical text in that area (above the word "Local")?

    #2
    In daily view, is there a way to limit the number of AllDay events displayed so that any beyond that number trigger a vertical scroll bar and are scrolled instead of making the appointments section so small as to be unusable?
  2. George
    Admin
    George avatar
    500 posts

    Posted 15 Aug 2013 Link to this post

    Hi Philip,

    Thank you for writing.

    You can get the cell above the one with the word "Local" in it with the following code:
    SchedulerDayViewElement schedulerDayViewElement = this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement;
     
    if (schedulerDayViewElement != null)
    {
        var cells = schedulerDayViewElement.HeaderElement.GetCells();
        cells[0].Text = "Text";
        cells[0].TextOrientation = Orientation.Vertical;
    }

    And in case you need the actual cell with the text "Local" inside, you can use this:
    SchedulerDayViewElement schedulerDayViewElement = this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement;
    DayViewAllDayHeader allDayHeader = schedulerDayViewElement.AllDayHeaderElement;
     
    if (allDayHeader != null)
    {
        var cells = allDayHeader.GetCells();
        cells[0].Text = "Text";
        cells[0].TextOrientation = Orientation.Vertical;
    }

    Regarding the second question - our RadScheduler does not support such functionality at the moment, that is why I have logged it in our Public Issue Tracking System as a new Feature Request. You can find the item on this address - http://www.telerik.com/support/pits.aspx#/public/winforms/15565. From there you can vote/comment/subscribe for item changes. Voting will increase the chance the feature will be implemented in future. I have also updated your Telerik Points for this request.

    Should you have any other questions, do not hesitate to ask.

    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Philip
    Philip avatar
    7 posts
    Member since:
    Sep 2012

    Posted 15 Aug 2013 Link to this post

    Thanks, this is what I am looking for ... but the code has no effect when run from the form's constructor ... what event should I be using?
  5. George
    Admin
    George avatar
    500 posts

    Posted 20 Aug 2013 Link to this post

    Hi Philip,

    Thank you for replying.

    The code provided works fine on my end, I am using it after the scheduler has been created. You can try to use it on FormLoad for example:
    void TestForm_Load(object sender, EventArgs e)
    {
        SchedulerDayViewElement schedulerDayViewElement = this.scheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
     
        if (schedulerDayViewElement != null)
        {
            var cells = schedulerDayViewElement.HeaderElement.GetCells();
            cells[0].Text = "Text";
            cells[0].TextOrientation = Orientation.Vertical;
        }
    }

    Or on a button click (for testing purposes). Additionally please note that this will only work if your scheduler is in day view mode as we are casting the ViewElement to SchedulerDayViewElement. If you are still unable to achieve the desired effect please provide me with a sample project to investigate the precise case.

    I hope this information helps. If you have further questions, feel free to write back.
     
    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top