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

Disabled Rows

Asked by Anonymous
4 months ago.

Is it possible to make read-only all children from a tree?

For example, I have a parent tree "Room A" with two children "Room A.1" and "Room A.2" the parent row is already disabled by "TreePreventParentUsage = true", is the a way for me to disable the rows "Room A.1" and "Room A.2"? If not, what is the best solution to make these two rows disabled/read-only?

Thanks for the reply.

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

The best way would be to use TimeRangeSelectingJavaScript to provide a custom event handler that forbids the selection for the given rows.

Something like this:

@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig {
  ...
  TimeRangeSelectingJavaScript = "if (args.resource === 'A.1') { args.allowed = false; } ",
})

TimeRangeSelectingJavaScript translates to onTimeRangeSelecting (https://api.daypilot.org/daypilot-scheduler-ontimerangeselecting/).

New Reply
This reply is
Your name (optional):