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

Assign the column name to daypilotcalendar.eventBackColor in pro

Asked by sree
11 years ago.

Hi All,

how to assign column name of the datatable to be binded to daypilotcalendar.eventBackcolor property in the pro version. As the property expect system.drawing.color. I have tried all the options. Can anyone suggest me a solution for it. And also while debugging the application i am getting the following error.

Microsoft JScript runtime error: Unable to get value of the property 'cells': object is null or undefined. Can any one suggest me what i am missing.

thanks

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

You need to use BeforeEventRender event handler:

protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
   e.BackgroundColor = (string) e.DataItem["colorfield'];
}

Comment posted by sree
11 years ago.

I am creating daypilotcalendar dynamically in code behind. Can you please let me know how to assign column name to backgroundcolor property

Comment posted by sree
11 years ago.

and also i am frequently seeing the javascript error

Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined

can anyone tell me how to solve this problem please

Comment posted by Dan Letecky [DayPilot]
11 years ago.

You can add the event handler like this:

DayPilotCalendar1.BeforeEventRender += DayPilotCalendar1_BeforeEventRender;

> Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined

Please create a new question for this issue and specify the version of DayPilot you are using (and also under what conditions it is happening).

Comment posted by sree
11 years ago.

I am using Daypilotpro trial 7.3. I don't see the beforeeventrender class in daypilot.web.UI.events namespace. Is it available only with paid version or am i looking at wrong place.

thanks

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