Hello,
I need to show all the information or all the events related with different resources at the same time using the daypilot calendar control, so, in order to identify which events belong to an specific resource i need to assign a color per resource, which arises the next questions:
1. Is it possible to do this ?
2. How can I change the color of the event per resource?
Thanks in advanced
Agustin
-
2/29/2008 7:00:16 PM
Place the resource in the DataTagFields
and in the BeforeEventRender you can switch the e.Tag[0] en set the e.BackgroundColor to a desired color foreach resource
Lauwens
-
3/3/2008 9:53:03 AM
Perhaps I wasn't that clear, and i see you wanted to change the DurationBar not the whole background color
So here code example
protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
switch (e.Tag)
{
case 0:
e.DurationBarColor = "yellow";
break;
case 1:
e.DurationBarColor = "red";
break;
case 2:
e.DurationBarColor = "green";
break;
}
}
Lauwens
-
3/3/2008 12:35:53 PM