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

BeforeCellRender conflicting refreshCallBack

Asked by Lauwens
16 years ago.
In Monthview I had a BeforeCellRender Event checking for if the cell date was today, to color the background different.
But when i was trying to change the month with the refreshcallback weird dates where rendering, the number of rows where changing (the way they have to) but march and april where still showing...
The events where wrong to...

So when I removed the BeforeCellRender the refreshCall worked as expected! Even with an empty BeforeCellRender this bug exists!

Didn't test it on the other controls, and i used the latest 1385.1 binary Sorry if this is a know bug and already posted, did a quick search but didn't find it yet!

Keep up the good work!
Comment posted by Dan Letecky
16 years ago.
It was indeed a bug. Thanks for reporting it!

I've just fixed it and the fix will be included in the next release. I can also send you a special build if you need it sooner (please contact me at support@daypilot.org).

The cell properties (title, background color, etc.) are generated on the client side but only if there is no BeforeCellRender event handler. If the event handler exists, all the properties are passed in a special array (generated on the server side). That array wasn't updated during the callback and that was causing the problem.
Comment posted by Thomas
16 years ago.
Hi

I have a similar problem and just wanted to confirm the fix you made will solve our problem.

When I call refreshCallBack() from a javascript function in month view mode the refreshcallback function is called as expected. I was then expecting the BeforeCellRender event to be triggered as a consequence but this does not happen. It works fine in weekview mode.

Thanks
Comment posted by Dan Letecky
16 years ago.
Yes, I believe you describe the same problem. BeforeCellRender wasn't executed at all during CallBack requests. Let me know if it persists in the next release (it will be 4.7, to be released next week).
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.