DependencyEdit
Feature
Feature that displays a popup containing fields for editing a dependency. Requires the Dependencies feature to be enabled. Double-click a dependency line in the demo below to show the editor.
Customizing the built-in widgets
const scheduler = new Scheduler({
columns : [
{ field : 'name', text : 'Name', width : 100 }
],
features : {
dependencies : true,
dependencyEdit : {
editorConfig : {
items : {
// Custom label for the type field
typeField : {
label : 'Kind'
}
},
bbar : {
items : {
// Hiding save button
saveButton : {
hidden : true
}
}
}
}
}
}
});
Built-in widgets
| Widget ref | Type | Weight | Description |
|---|---|---|---|
fromNameField |
DisplayField | 100 | From task name (readonly) |
toNameField |
DisplayField | 200 | To task name (readonly) |
typeField |
Combo | 300 | Edit type |
lagField |
DurationField | 400 | Edit lag |
The built-in buttons are:
| Widget ref | Type | Weight | Description |
|---|---|---|---|
saveButton |
Button | 100 | Save button on the bbar |
deleteButton |
Button | 200 | Delete button on the bbar |
cancelButton |
Button | 300 | Cancel editing button on the bbar |
This feature is disabled by default. For info on enabling it, see GridFeatures.
Useful configs and functions
| Member | Description |
|---|---|
| beforeDependencyEditShow | Fires before editor is shown |
| beforeDependencyEdit | Fires before editing starts |
| beforeDependencySave | Fires before save |
| beforeDependencyDelete | Fires before delete |
| afterDependencySave | Fires after dependency is saved |
See also
- Dependencies - Dependencies feature
- DependencyModel - Dependency data model
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
True to hide this editor if a click is detected outside it (defaults to true)
-
Default editor configuration, used to configure the Popup.
-
True to save and close this panel if ENTER is pressed in one of the input fields inside the panel.
-
The event that shall trigger showing the editor. Defaults to
dependencydblclick, set to empty string ornullto disable editing of dependencies.Has a corresponding runtime triggerEvent property.
-
True to show a delete button in the form.
-
True to show the lag field for the dependency
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of DependencyEdit class, or subclass thereof.
-
Reference to the cancel button, if used
-
Reference to the delete button, if used
-
Reference to the source task name field
-
Reference to the lag field
-
Reference to the save button, if used
-
Reference to the target task name field
-
Reference to the dependency type field
-
Identifies an object as an instance of DependencyEdit class, or subclass thereof.
-
The event that shall trigger showing the editor. Defaults to
dependencydblclick, set to empty string ornullto disable editing of dependencies.Has a corresponding triggerEvent config.
Functions
Functions are methods available for calling on the class-
Delete dependency being edited
Triggers: beforeDependencyDelete
-
loadRecord( )private
Sets fields values from record being edited
-
updateRecord( )private
Updates record being edited with values from the editor