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

RadScheduler: show text to left of daily-view appointments

3 Answers 87 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 12 Aug 2013, 12:45 PM
#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?

3 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 15 Aug 2013, 12:11 PM
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 >>
0
Philip
Top achievements
Rank 1
answered on 15 Aug 2013, 05:47 PM
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?
0
George
Telerik team
answered on 20 Aug 2013, 11:40 AM
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 >>
Tags
Scheduler and Reminder
Asked by
Philip
Top achievements
Rank 1
Answers by
George
Telerik team
Philip
Top achievements
Rank 1
Share this question
or