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

Scheduler - Frozen rows are not processed in onRowFilter

Asked by Anonymous
1 year ago.

Hi,
I wanted to hide top frozen rows as soon as they don't have any events any more. The user is allowed to delete these events. After each deletion I call DayPilot.Scheduler.rows.filter(), that triggers the onRowFilter() event handler. However, I found out, that the all rows except the frozen row are processed in onRowFilter

Comment posted by Anonymous
1 year ago.
I also have a problem when I want to show the top frozen row the first time I add an event to it. In this case the forzen row remains hidden.
let resource = {
	id: DayPilot.guid(),
	name: '',
	frozen: 'top'
};

this.addEvent(resource, {id: DayPilot.guid(), text: 'test'})

this.personResources.push(resource);
Answer posted by Dan Letecky [DayPilot]
1 year ago.

Frozen rows are now supported by the row filter in the latest sandbox build (2023.1.5544).

The documentation is updated as well:
https://doc.daypilot.org/scheduler/frozen-rows/

Comment posted by Dan Letecky [DayPilot]
1 year ago.

> I also have a problem when I want to show the top frozen row the first time I add an event to it. In this case the frozen row remains hidden.

It's not clear how you update the resources - it's necessary to call update() after changing the "resources" array:

dp.resources.push({id: 1, name: "Row 1"});
dp.update();

Or you can add an up-to-date resources array to "options" object of the update() method:

const resources = getCurrentResources();
dp.update({resources});

You can also add a new resource to the bottom using rows.add():
https://api.daypilot.org/daypilot-scheduler-rows-add/

Or as the last child of another resource using rows.addChild():
https://api.daypilot.org/daypilot-scheduler-rows-addchild/

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