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

how to change the colour of e.DurationBarColor

Asked by harshad jadhav
12 years ago.

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.

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

You need to add this:

DataTagFields="color"

and handle BeforeEventRender event:

    protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
    {
        e.DurationBarColor = e.Tag["color"];
    }
Comment posted by Anonymous
12 years ago.

Thankyou Dan..

this solves my problem..

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