Hi,
I'm developing a hire application and am using the trial version of DayPilotScheduler.
I am having difficultly getting Resource data into the Scheduler.Do I HAVE to programatically add Resources or is there a simpler method? i.e. can I just extract them from a sqldataadapter?
Any sample code?
thanks
John
-
5/31/2008 12:51:43 AM
You should fill the Resources collection manually:
protected void Page_Load(object sender, EventArgs e)
{
// I assume that resources are loaded in dtResources DataTable
foreach (DataRow dr in dtResources.Rows) {
DayPilotScheduler1.Resources.Add(new Resource(dr["name"], dr["id"]);
}
}
The Resources collection is stored in the ViewState so it's possible to place this init code inside if (!IsPostBack) block. However, the ViewState for DayPilotScheduler is usually very large - I recommend turning it off and placing the initialization code outside of if (!IsPostBack).
Do you mean that it is best to turn off the view state for the scheduler control?
John
-
6/1/2008 11:10:40 PM