Click here to Skip to main content
Licence Apache
First Posted 14 Dec 2008
Views 60,332
Downloads 977
Bookmarked 131 times

DayPilot Scheduler Control for ASP.NET

By Dan Letecky | 20 Apr 2009
Flexible open-source scheduler control (resource booking, project management, timeline and free/busy visualization)

1

2
2 votes, 8.0%
3
2 votes, 8.0%
4
21 votes, 84.0%
5
4.87/5 - 25 votes
2 removed
μ 4.76, σa 1.06 [?]
DayPilot Scheduler Screenshot

Live Demos 

Features

Main features:

  • Simple and clean look
  • Multiple resources on the Y axis
  • Customizable time scale on the X axis (one cell = 1 minute, 1 hour, 1 day, 1 week ...)
  • Highlights business hours (customizable color)
  • Automatically handles concurrent events
  • Customizable event box (text, size, background color, duration bar...)
  • Customizable fonts and colors

Database connectivity:

  • DataSource and DataSourceID properties supported
  • SqlDataSource
  • XmlDataSource
  • DataTable
  • DataSet
  • ArrayList
  • and other sources...

Event handling:

  • Free time slot click event (automatic PostBack or manual JavaScript handling)
  • Calendar event click event (automatic PostBack or manual JavaScript handling)

Licensing:

  • Open-source (Apache Software License 2.0)

Compatibility:

  • Internet Explorer 6
  • Internet Explorer 7
  • Firefox 2
  • Firefox 3
  • Opera 9
  • Safari 2
  • Safari 3
  • Google Chrome 1

Background Information

DayPilot Scheduler reuses the event arranging algorithms introduced in the DayPilot Calendar control (Outlook-like day and week view calendar/scheduler):

DayPilot Calendar Screenshot

DayPilot Calendar detects blocks of overlapping events so they could be displayed properly. The width of each event box is adjusted according to the number of concurrent events:

DayPilot Calendar Screenshot

DayPilot Scheduler uses the same arranging algorithm but the layout is different:

  • The Scheduler shows the time on the X axis.
  • Event box height is fixed.
  • Concurrent events are handled by increasing the row height, not by shrinking the event box.

DayPilot Scheduler Screenshot

This reduces the concurrency problem: The increasing number of concurrent events doesn't reduce readability.

See Also

Minimum Setup Sample

<DayPilot:DayPilotScheduler 
  ID="DayPilotScheduler1" 
  runat="server" 
  DataSourceID="SqlDataSource1"
  DataStartField="start" 
  DataEndField="end" 
  DataTextField="name" 
  DataValueField="id" 
  DataResourceField="resource" 
  StartDate="2009-01-01"
  CellDuration="60" 
  Days="1" >
    <Resources> 
      <DayPilot:Resource Name="Room A" Value="A" /> 
      <DayPilot:Resource Name="Room B" Value="B" /> 
      <DayPilot:Resource Name="Room C" Value="C" /> 
    </Resources> 
</DayPilot:DayPilotScheduler> 

The first group properties defines the data binding:

  • DataSourceID
  • DataStartField (starting DateTime)
  • DateEndField (ending DateTime)
  • DataTextField (event text)
  • DataValueField (event id)
  • DataResourceField (resource id)

DataResourceField is important - the values from this column will be matched with the resource IDs (Resource.Value).

The second group defines the time range and scale:

  • StartDate (first visible day)
  • Days (number of visible days)
  • CellDuration (cell duration in minutes)

And finally, it's necessary to define the resources (rows):

  • Resource.Name (row name)
  • Resource.Value (row ID)

Usage Examples

Daily Scheduler

DayPilot Scheduler Screenshot

Settings:

Days="1" 
CellDuration="60"

StartDate is set manually in the code behind:

DayPilotScheduler1.StartDate = DateTime.Today; 

Weekly Scheduler

DayPilot Scheduler Screenshot

Settings:

Days="7"
CellDuration="1440" 

The first day of week is calculated using Week.FirstDayOfWeek helper:

DayPilotScheduler1.StartDate = Week.FirstDayOfWeek(DateTime.Today, DayOfWeek.Monday);

Monthly Scheduler 

DayPilot Scheduler Screenshot

Settings:

CellDuration="1440" 

In this case, it's necessary to set the Days property manually:

DayPilotScheduler1.StartDate = 
	new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); 
DayPilotScheduler1.Days = 
	DateTime.DaysInMonth(DateTime.Today.Year, DateTime.Today.Month); 

Free/Busy Visualisation

DayPilot Scheduler Screenshot

This view doesn't show event name (DataTextField is bound to an empty column).

Settings:

DurationBarVisible="false"
EventBackColor="#4A71CE" 

Timeline Visualisation

DayPilot Scheduler Screenshot

In the timeline view, the resources are replaced with events in the row headers. There is always just one event per row.

Settings: 

DurationBarVisible="false"
EventBackColor="#CA2A50" 

See Also

History

  • December 19, 2008: DayPilot Lite 3.0 SP1 released - a bug fixing release (NonBusinessHours="HideIfPossible" mode fixed)  
  • April 20, 2009: Release history link added. Minor formatting changes.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0

About the Author

Dan Letecky



Czech Republic Czech Republic

Member
My open-source ASP.NET 2.0 controls:
 
DayPilot - Outlook-like calendar/scheduling control
DayPilot MonthPicker - Light-weight month picker
MenuPilot - Hover context menu

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 5 Pinmembermanoj kumar choubey20:42 3 Feb '12  
GeneralNice library Pinmemberhandy_creative17:42 5 Jun '11  
Questionurdent replay Pinmemberamr rabie19:01 19 Apr '11  
GeneralMy vote of 5 PinmentorSandeep Mewara10:50 19 Oct '10  
GeneralIts great, No need of telerik scheduler PinmemberJitendra Zaa3:22 13 May '10  
GeneralGreat work Pinmembermike23154:43 5 Feb '10  
I was looking for scheduler like this I will try to use it in upcomming project.
Mike
www.esoftcoder.com
GeneralSilverLight Version PinmemberErnesto Herrera5:52 22 Oct '09  
GeneralRe: SilverLight Version PinmemberDan Letecky5:05 28 Oct '09  
Generalnice work PinmemberJeffCirceo23:08 27 Apr '09  
GeneralRe: nice work PinmemberDan Letecky10:45 5 May '09  
GeneralGreat work !!! Pinmemberashu fouzdar21:59 16 Dec '08  
GeneralRe: Great work !!! PinmemberDan Letecky21:24 17 Dec '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 20 Apr 2009
Article Copyright 2008 by Dan Letecky
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid