LockRows
This feature allows resources which satisfy a certain condition to be locked at the top of the scheduler.
By default, the condition is that a certain named field have a truthy value. The field which decides this status
defaults to 'fixed', but that is configurable using the fieldName property.
When used with fieldName, the CellMenu context menu appears with an extra option to toggle the value of that field in the contextual record.
For more granular control, use the filterFn to decide which records should be locked.
//<code-header>
fiddle.title = 'Lock rows';
//</code-header>
const resources = ArrayHelper.populate(50, i => ({ id : i, name : `Resource ${i}` }), true);
resources[0].inactive = true;
const scheduler = new Scheduler({
appendTo : targetElement,
height : 400,
startDate : new Date(2023, 4, 22),
endDate : new Date(2023, 5, 30),
features : {
lockRows : {
fieldName : 'inactive'
}
},
columns : [
{ field : 'name', text : 'Name', width : 100 },
{ field : 'inactive', text : 'Inactive', type : 'check' }
],
resources,
events : ArrayHelper.populate(200, i => ({ id : i, name : `Event ${i}`, resourceId : i % 50, startDate : new Date(2023, 4, 22, i * 12), duration : 4 }), true)
});Caveats
This features utilizes the Split feature behinds the scenes to create a split view of the scheduler. Each part of the view is a separate scheduler instance, which means that certain operations are limited to one part of it at the time. Unsupported features:
- Drag selection and shift + click selection.
- Dependencies between events in different split sections
- Summary feature
- RowReorder feature: Rows cannot be dragged between different sections
- TimeSelection feature
- PdfExport feature
- Export to Excel
- Scheduler Pro: TimeSpanHighlight feature
- Scheduler Pro: CalendarHighlight feature
- Tree
This feature is disabled by default.