Create DayView for multi day

2 posts, 0 answers
  1. Thanh
    Thanh avatar
    9 posts
    Member since:
    Dec 2015

    Posted 27 Jan Link to this post


     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.

  2. Dess
    Dess avatar
    1561 posts

    Posted 27 Jan Link to this post

    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 scroll bar. In order to achieve your goal, you can use SchedulerTimelineView and define the desired ranges: 
    public Form1()
        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)
        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.
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top