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

TimeLineView - How to set a date range?

1 Answer 129 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dawn
Top achievements
Rank 2
Dawn asked on 19 Jul 2011, 10:07 PM

Hi,

I am evaluating your product, and can't figure out how to set the date range for a TimeLineView.

I am trying to display this week and next week, weekdays only, always starting on Monday of this week and ending on Friday of next week.  I would also like a break between weeks so that week 1 shows up above week 2.

I am doing this server side in C#:

The below code works but displays a date range from today though to the number of slots specified.

schd.DataSource = datasource;

schd.DataKeyField = "ID";

schd.DataSubjectField = "NumSwaps";

schd.DataStartField = "Roll_Date";

schd.DataEndField = "Roll_Date";

schd.SelectedView = SchedulerViewType.TimelineView;

schd.TimelineView.ColumnHeaderDateFormat = "dddd MM/dd";

schd.TimelineView.NumberOfSlots = 5;

schd.ShowNavigationPane = false;

schd.FirstDayOfWeek = DayOfWeek.Monday;

schd.LastDayOfWeek = DayOfWeek.Friday;

schd.ShowFooter = false;

schd.ShowAllDayRow = false;

schd.ShowHoursColumn = false;

schd.OverflowBehavior = OverflowBehavior.Expand;

schd.DataBind();

<telerik:RadScheduler ID="schd" runat="server" ShowViewTabs="false" ReadOnly="true">

</telerik:RadScheduler>

 

Screenshot attached, and thanks!

Dawn

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 20 Jul 2011, 02:27 PM
Hello Dawn,

Please, see this demo. You can apply the logic for MultiDay view for Timeline view as well.

Let me know if you need more help with this.

All the best,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Scheduler
Asked by
Dawn
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or