DataDropOptions
Setup model for how to handle data dragged from other grids
Signature:
export interface DataDropOptions
Remarks
If callback is not specified, it operates as set in fieldMap or fieldMapCallback.
If nothing is specified, the values of fields with the same field name are moved/copied according to dropMode.
EditOptions.movable must be true
.
When setting it as an option in Grid, you only need to enter the necessary information.
Example
grid.setDataDropOptions({dropMode: 'copy'});
Events
Property | Type | Description |
---|---|---|
callback | DataDropCallback | A callback indicating that a drop has been made |
dragCallback | DataDragCallback | Callback that determines drag and drop |
fieldMapCallback | DropFieldMapCallback | A callback that returns an object of type FieldMap and uses it as a rule |
labelCallback | DataDragLabelCallback | A callback to determine the label text of the item being dragged |
Properties
Property | Type | Description |
---|---|---|
cursor | string | Specifies the cursor when dragging. |
dropMode | DataDropMode | data drop mode |
dropOtherElement | boolean | Whether to drop on another HTMLElement other than the grid |
dropOtherGrid | boolean | Whether to drop to another grid |
feedbackStyle | DragFeedbackStyle | feedbackStyle |
fieldMap | FieldMap | Field name of the grid where the drag was started - Field name of the grid to be dropped Pair |
proxyLabel | string | Label text of the item being dragged |
scroll | boolean | If false , vertical grid scrolling is not performed during dragging. |
Events Desc
callback
A callback indicating that it was dropped
Type
- DataDropCallback
Remarks:
Occurs when dropped. This is a variant of DataDropCallback.
dragCallback
Callback that determines drag and drop
Type
- DataDragCallback
Remarks:
Occurs when drag starts. The format is DataDragCallback.
fieldMapCallback
A callback that returns an object of type FieldMap and uses it as a rule.
Type
- DropFieldMapCallback
Remarks:
The format is DropFieldMapCallback. It must be set to the grid where it will be dropped.
labelCallback
A callback to determine the label text of the item being dragged.
Type
- DataDragLabelCallback
Properties Desc
cursor
Specifies the cursor when dragging.
Type
- string
dropMode
data drop mode
Type
- DataDropMode
Remarks:
When dropping, you can set whether to move or copy a row using the value of DataDropMode.
dropOtherElement
Whether to drop on another HTMLElement other than the grid
Type
- boolean
dropOtherGrid
Whether to drop to another grid
Type
- boolean
feedbackStyle
feedbackStyle
Type
- DragFeedbackStyle
Remarks:
Style of feedback displayed when mouse over
fieldMap
Field name of the grid where the drag was started - Field name of the grid to be dropped Pair
Type
- FieldMap
Remarks:
If callback or feildMapcallback is not set, this value is followed. It must be set to the grid to be dropped in the format FieldMap.
Example:
{'CompanyName':'ShipAddress'}
proxyLabel
Label text of the item being dragged
Type
- string
Remarks:
If DataDropOptions.labelCallback is not set, this value is followed.
[List of available expressions]
${rows}
- Number of dragged items
${mode}
- Current dropMode
${from}
- dragged location (index)
${to}
- Location to be copied or moved (index)
Example:
gridView.dataDropOptions.proxyLabel = '${rows} rows ${to} ${mode}'
// ex) 'Copy 1 row to 4'
scroll
If false
, vertical grid scrolling is not performed during dragging.
Type
- boolean