Home Unanswered Active Tags New Question

how to change the colour of e.DurationBarColor

Hello All,

I have following table in database.
1) appointmentid
2) visitorname
3) starttime
4) endtime
5) Color

i have binded it to the DayPilotCalendar. using properties
1) DataTextField="visitorname"
2) DataValueField="appointmentid"
3) DataStartField="starttime"
4) DataEndField="endtime"

My problem is that i want to show each cell with its respected color(which is present in database) in the table.

can someone tell me how to do that.

Asked by harshad jadhav 10 months ago.
Replies

You need to add this:

DataTagFields="color"

and handle BeforeEventRender event:

    protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
    {
        e.DurationBarColor = e.Tag["color"];
    }
Answer posted by Dan Letecky [DayPilot] 10 months ago.

Thankyou Dan..

this solves my problem..

Comment posted by Anonymous 10 months ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java