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

Scheduler add ResourceColumn programmatically

Asked by Davide
9 years ago.


I'm using the scheduler and i would like to add programmatically ResourceColumn.
My sample code is:

DataTable dt = dl.SelectRooms();
int i = 0;
foreach (DataRow r in dt.Rows)
Resource res = new Resource(r["room_name"].ToString(), r["id_room"].ToString());

ResourceColumn rc = new ResourceColumn("Test " + i.ToString());



I think my code is right, but i have no effect on DayPilotScheduler, only the Resource is created.
However, after the above code i try to read the each Column and all ResourceColumn are correctly valued:

foreach(Resource r in DayPilotScheduler1.Resources)
foreach (ResourceColumn c in r.Columns)
string str_readValue = c.InnerHTML;

There is something wrong on my code, or the scheduler doesn't permit to add programmatically ResourceColumn?


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