search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to add resources columns to the calendar

Asked by Anonymous
11 years ago.


I'm trying to add the columns for the resources into my calendar for one day. I already have the scheduler working on a separate page, with the resources loaded into it. I've tried the same method for the caleendar but there isn't a property of 'DayPilotCalendar.Resources.Add(name, id)' as there is with the scheduler. Am I on the wrong lines here? I've changed the view type property to be resources but I'm guessing I need to load my resources table somewhere in the vb?


Answer posted by Dan Letecky [DayPilot]
11 years ago.

Hi Martyn,

In the Calendar control ( you need to use Columns property:

DayPilotCalendar.Columns.Add(name, id);

You can also define custom date for each column:

Column c = new Column(name, id);
c.Date = DateTime.Today;

And in combination with HeaderLevel, you can define a column hierarchy (an example from

    private void defineColumns()

        DateTime first = Week.FirstDayOfWeek(DayPilotCalendar1.StartDate);

        for (int i = 0; i < 7; i++)
            DateTime day = first.AddDays(i);

            Column c = new Column(day.ToShortDateString(), day.ToString("s"));
            c.Date = day;

            Column c1 = new Column("A", "A");
            c1.Date = day;

            Column c2 = new Column("B", "B");
            c2.Date = day;

            if (day.Date == DateTime.Today)
                Column c3 = new Column("C", "C");
                c3.Date = day;


See also:

Comment posted by Anonymous
11 years ago.

Thanks very much Dan, much appreciated.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.