CellEdit
Feature
Extends the Grid's CellEdit feature to integrate with the Scheduler Pro scheduling engine. It wraps cell edit operations in project transactions, ensuring that all changes to scheduling-related fields (such as start date, duration, or effort) are processed atomically through the scheduling engine and can be cleanly committed or reverted. This feature also coordinates with other transactional features to prevent conflicting edits from occurring simultaneously.
This feature is enabled by default.
Useful configs
| Config | Description |
|---|---|
| autoSelect | Select field text when editing starts |
| blurAction | Action on focus leave (complete/cancel) |
| addNewAtEnd | Add new record on Tab/Enter at last cell |
| editNextOnEnterPress | Edit next row on Enter key |
const schedulerPro = new SchedulerPro({
features : {
cellEdit : {
autoSelect : true,
blurAction : 'complete',
addNewAtEnd : true
}
}
});
See also
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set to
trueto select the field text when editing starts -
What action should be taken when focus moves leaves the cell editor, for example when clicking outside. May be
'complete'or'cancel'. -
Class to use as an editor. Default value: Editor
-
See Keyboard shortcuts for details
-
What action should be taken when the editor is scrolled out of view, for example when using a mousewheel to scroll the grid. May be
'complete'or'cancel' ornull.Has a corresponding runtime scrollAction property.
-
Internal listeners, that cannot be removed by the user.
-
Set to
trueto start editing when user starts typing text on a focused cell (as in Excel)Has a corresponding runtime autoEdit property.
-
A CSS selector for elements that when clicked, should not trigger editing. Useful if you render actionable icons or buttons into a grid cell.
-
The widget which this plugin is to attach to.
Has a corresponding runtime client property.
-
Set to
falseto disable localization of this object.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of CellEdit class, or subclass thereof.
-
Identifies an object as an instance of Delayable class, or subclass thereof.
-
Identifies an object as an instance of Events class, or subclass thereof.
-
Identifies an object as an instance of Localizable class, or subclass thereof.
-
A class property getter for the default values of internal properties for this class.
-
An empty array that can be used as a default value.
-
An empty object that can be used as a default value.
-
What action should be taken when the editor is scrolled out of view, for example when using a mousewheel to scroll the grid. May be
'complete'or'cancel' ornull.Has a corresponding scrollAction config.
-
Identifies an object as an instance of CellEdit class, or subclass thereof.
-
Identifies an object as an instance of GridEditBase class, or subclass thereof.
-
Identifies an object as an instance of InstancePlugin class, or subclass thereof.
-
Returns the record currently being edited, or
null -
Set to
trueto start editing when user starts typing text on a focused cell (as in Excel)Has a corresponding autoEdit config.
-
Is editing currently active?
-
Returns a copy of the full configuration which was used to configure this object.
-
This property is set to
truebefore theconstructorreturns. -
This property is set to
trueon entry to the destroy method. It remains on the objects after returning fromdestroy(). If isDestroyed istrue, this property will also betrue, so there is no need to test for both (for example,comp.isDestroying || comp.isDestroyed). -
The Widget which was passed into the constructor, which is the Widget we are providing extra services for.
Has a corresponding client config.
-
Get the global LocaleHelper
-
Get the global LocaleManager
Functions
Functions are methods available for calling on the class-
This optional class method is called when a class is mixed in using the mixin() method.
-
Registers this class type with its Factory
-
Cancel editing on widget focusout
-
Cancel edit on touch outside of grid for mobile Safari (focusout not triggering unless you touch something focusable)
-
Internal function used to hook destroy() calls when using thisObj
-
Internal function used restore hooked destroy() calls when using thisObj
-
Auto detaches listeners registered from start, if set as detachable
-
Internal function used to run a callback function after an event is triggered
-
Removes all listeners registered to this object by the application.
-
This will merge a feature's (subclass of InstancePlugin) keyMap with it's client's keyMap.
-
Starts editing if user taps selected cell again on touch device. Chained function called when user clicks a cell.
-
Event handler added when editing is active called when user clicks a cell in the grid during editing. It finishes editing and moves editor to the selected cell instead.
-
Finish editing if clicking below rows (only applies when grid is higher than rows). Also finish if event target is the subgrid which can happen if the pointer is moved during mouse down.
-
Realign editor if grid renders rows while editing is ongoing (as a result to autoCommit or WebSocket data received).
-
Update the input field if underlying data changes during edit.
-
Called when the user triggers the edit action in triggerEvent config. Starts editing.