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.

Please note that this feature will not work with the Split feature.

Lock rows
//<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.

Configs

13

Common

disabledInstancePlugin
listenersEvents

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

fieldNameLockRows
filterFnLockRows

Properties

18

Common

disabledInstancePlugin

Class hierarchy

isLockRows: Boolean= truereadonly
Identifies an object as an instance of LockRows class, or subclass thereof.
isLockRows: Boolean= truereadonlystatic
Identifies an object as an instance of LockRows class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable
isSplitSplit

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

31

Common

splitSplit
unsplitSplit

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
lockRowsLockRows
onEvents
relayAllEvents
triggerEvents
unEvents

Events

9
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin
lockRowsLockRows
splitSplit
unlockRowsLockRows
unsplitSplit

Event handlers

9
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin
onLockRowsLockRows
onSplitSplit
onUnlockRowsLockRows

Typedefs

1

CSS variables

2

Inherited