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

Create DayView for multi day

1 Answer 58 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Thanh
Top achievements
Rank 1
Thanh asked on 27 Jan 2016, 09:19 AM

Hi,

 I used DayView to display appointment for selected day in RadCalendar. Here are my code:

radScheduler.GetDayView().StartDate = ucPageCalendars.RadCalendar.SelectedDates[0];
radScheduler.GetDayView().DayCount = ucPageCalendars.RadCalendar.SelectedDates.Count;

 

if many days are clicked, I want scheduler have the scrollbar like attached image. There is anyway to do this.

 Looking forward for your answer,

Pham Thanh.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Jan 2016, 11:49 AM
Hello Pham,

Thank you for writing.

SchedulerDayView can show a predefined number of days through the DayCount property. It is not designed to show a horizontal . In order to achieve your goal, you can use SchedulerTimelineView and define the desired ranges: 
public Form1()
{
    InitializeComponent();
    this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;
    this.radCalendar1.AllowMultipleSelect = true;
    this.radCalendar1.SelectionChanged += radCalendar1_SelectionChanged;
}
 
private void radCalendar1_SelectionChanged(object sender, EventArgs e)
{
    int startIndex = 0;
    if (this.radCalendar1.SelectedDates.Count > 1)
    {
        startIndex++;
    }
    this.radScheduler1.GetTimelineView().RangeStartDate = this.radCalendar1.SelectedDates[startIndex];
    SchedulerTimescale currentScaling = this.radScheduler1.GetTimelineView().GetScaling();
    currentScaling.DisplayedCellsCount = this.radCalendar1.SelectedDates.Count;
    this.radScheduler1.GetTimelineView().RangeEndDate = this.radCalendar1.SelectedDates[0].AddDays(1);
}

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Scheduler and Reminder
Asked by
Thanh
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or