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

How to disable an specific (the first one) row in Daypilot.Scheduler

Asked by Anonymous
6 years ago.

Hi guys, I want to know if there is a way to disable the drag and drop from a particular row in the scheduler. I get all the resources and then iterate on them to fill the rows.
Also I would like to know if someone knows how to change it's color, only for that row.

Answer posted by navya
6 years ago.

Hi,

If you are still looking for a solution.
in MVC we have OnEventMove() being called on moving the events. You can probably check if the row is the one which you are looking for to be disabled. In that case just exit from the function, without calling the eventmove functionality.

In below case, im looking if the row is in buidingID list, if yes i donot allow the event to be dropped in that row.

protected override void OnEventMove(EventMoveArgs e)
{
.......

......

if (BuildingIds.Contains(e.NewResource))
{
return;
}
new EventManager(Controller).EventMove(e.Id, e.NewStart, e.NewEnd, e.NewResource);
UpdateEvent(e.Id, e.NewStart, e.NewEnd, e.NewResource, "Update");
externaldrag = true;
.....
}

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