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

is there a way to update/refresh/re-render a single cell based on the resource id and date ?

Asked by andy
2 months ago.

i need to update a update a single cell after i drag drop an event. else i should be able to trigger 'onBeforeCellRender' event pragmatically from other function

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

By default, cell properties customized using onBeforeCellRender are cached until a full update().

1. If your cell content depends on the overlapping events you can simply turn the caching off:

dp.beforeCellRenderCaching = false;

See also:
https://api.daypilot.org/daypilot-scheduler-beforecellrendercaching/

This approach is used in the "Resource Utilization" demo because it requires that the cells are updated after every drag and drop change:
https://javascript.daypilot.org/demo/scheduler/resourceutilization.html

2. Another option is to keep the caching on and invalidate a specific cell:

dp.cells.find("2019-09-13T12:00:00", "R123").invalidate();

See also:
https://api.daypilot.org/daypilot-cellarray-invalidate/

If you invalidate the cell before the event is actually moved (i.e. in onEventMove, not in onEventMoved) the cell will be updated automatically.

New Reply
This reply is
Your name (optional):