DayPilot - Open-Source Outlook-Like Calendar/Scheduling Control for ASP.NET
Try the online demo: AJAX-style event creating, moving, resizing, and deleting • Context menu • Day view • Work week view • Week view • Month view • Horizontal/vertical resources view • PostBack/AJAX/JavaScript event handling • Binding to XmlDataSource, SqlDataSource, DataTable, ArrayList • Custom event formatting • UpdatePanel compatibility

HOWTO: Add columns programmatically in resources view

Applies to: DayPilotCalendar

Example (having the information about resources in dt DataTable):

foreach (DataRow dr in dt.Rows) {
  DayPilotCalendar1.Column.Add(new Column((string)dr["name"], (string)dr["id"]));
}

You should call this code in Page_Load method. If you are using ViewState, it's enough to add it inside the conditional block (it will be stored in the ViewState for the subsequent calls):

if (!IsPostBack) {
  foreach (DataRow dr in dt.Rows) {
    DayPilotCalendar1.Column.Add(new Column((string)dr["name"], (string)dr["id"]));
  }
}

DayPilot Pro is an advanced DayPilot edition. You can check a thumbnail overview of the most interesting features. There is also an online demo with all the features working (including the AJAX features). If you want to test the design-time support and API you can download a fully functional trial version. And if you like it, you can buy a full version with source code and 12 months of upgrades and support (with a 30-days money back guarantee).

DayPilot Lite is a do-it-yourself open-source edition of DayPilot. Although it misses some DayPilot Pro features, there are thousands of developers using it to build calendar, personal scheduling, and resource booking applications.

Questions or suggestions? Try DayPilot forums or contact us directly.