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

Disable Group Availability Row

Asked by VitseA
2 years ago.

Hi,

I have another issue with Displaying Group Availability

How can I disable the Displaying Group Availability row on move event (for example).

Actually I used

dp.rows.find(args.e.data.resource).parent().cells.all().invalidate();

But, if I move an event from one group to another after hovering over the availability row the scheduler stops working.

Thanks you in advance

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

The purpose of the invalidate() method (https://api.daypilot.org/daypilot-cellarray-invalidate/) is to ask for a fresh result of onBeforeCellRender event callback. It is useful if you display calculated values in cells and want to force the content to update.

If you want to disable rows for drag and drop there are several options:

1. You can add cellsDisabled: true to the resource properties (items of the resources array - https://api.daypilot.org/daypilot-scheduler-resources/).

2. You can use args.cell.disabled = true in onBeforeCellRender. This allows finer control over the disabled cells (you can disable just a part of a row this way). See also:
https://api.daypilot.org/daypilot-scheduler-onbeforecellrender/

3. You can also disable a specific drop position dynamically using onEventMoving, onEventResizing, etc. (args.allowed = false).

Option #1 should work fine your case.

Answer posted by VitseA
2 years ago.

It's work fine (option 1) ! thanks

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