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

Cell background set in BeforeCellRender but not show for whole scheduler

Asked by Ling
9 years ago.

Hi,
I set the e.BackgroundColor = "red"; in this function [BeforeCellRender]
But i notice it only show 2 rows in red color. It wont show for whole scheduler.
It only show for others rows(all cell) when you scroll.
This is annoying and i dono how to solve it.
Do anyone know how to solve this issues? May refer to image for the issues.
Weirdly if i integrate navigator with previous and next, it will show all cell in red color.
My main purpose is will show different color for each cell slot according to each person working hours. Thus, I need those non working in grey color and working on white color. But right now it doesn't show unless i scroll it.

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

Are you using the latest DayPilot version?

Something like this can happen:

1) if the Scheduler height is detected incorrectly (this may happen if the parent element is hidden during the Scheduler initialization) or

2) if it is initially rendered with a smaller height which is increased later

#1 - the latest version detects the hidden parent automatically and fixes the Scheduler when it becomes visible

#2 - recently, there was a bug that prevented the Scheduler from detecting window resizing correclty; this should be fixed in the latest release as well

You can also refresh the Scheduler manually by calling .show() on the client side (JavaScript):

dp.show();

Where "dp" is the value of ClientObjectName.

Comment posted by Ling
9 years ago.

Hi Dan,
I am using latest version 8.1.3461.1 but the issues still reproducible.
It may regard to the height issues on DayPilot scheduler.
As i put DayPilot inside the Telerik RadPane, RadSplitter and the height is maybe not known that time.
To solve this, I put in a little trick DayPilotScheduler.setScrollX(1) and DayPilotScheduler.setScrollX(-1) in javascript.
After this little bit of code, it can show the background cell color correctly.
May I know is that any drawback/issues of using this code in javascript? It shouldn't be performance issues right?
Thanks.

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