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

Alternating row colors when some rows are hidden

Asked by Julie
2 months ago.

When implementing alternating row colors AND hiding rows without resources, alternating row colors don't work correctly: the same color can be shown for two or more consecutive rows. (See the attached example.)

Is there a way to work around this?

Thanks

Answer posted by Dan Letecky [DayPilot]
2 months ago.

The latest sandbox build (2019.1.3540) supports args.cell.displayY in onBeforeCellRender and args.row.displayY in onBeforeRowHeaderRender that you can use to get the display Y position. No two adjacent rows will have the same color in this case.

Sandbox:
https://javascript.daypilot.org/sandbox/

The examples at https://doc.daypilot.org/scheduler/alternate-row-colors/ are now updated as well.

New Reply
This reply is
Your name (optional):