{/* Do not edit this file. It is automatically generated by API Documenter. */}


## DataDropOptions

Setup model for how to handle data dragged from other grids

**Signature:**

```typescript
export interface DataDropOptions
```

## Remarks

If callback is not specified, it operates as set in [fieldMap](/refs/Interface/DataDropOptions#fieldmap) or [fieldMapCallback](/refs/Interface/DataDropOptions#fieldmapcallback).

If nothing is specified, the values of fields with the same field name are moved/copied according to [dropMode](/refs/Interface/DataDropOptions#dropmode).

[EditOptions.movable](/refs/Interface/EditOptions#movable) must be `true`.

When setting it as an option in [Grid](/refs/Class/GridBase), you only need to enter the necessary information.

## Example


```js
grid.setDataDropOptions({dropMode: 'copy'});
```

## Events

| Property | Type | Description |
| --- | --- | --- |
| [callback](/refs/Interface/DataDropOptions#callback) | [DataDropCallback](/refs/realgrid#datadropcallback) | A callback indicating that a drop has been made |
| [dragCallback](/refs/Interface/DataDropOptions#dragcallback) | [DataDragCallback](/refs/realgrid#datadragcallback) | Callback that determines drag and drop |
| [fieldMapCallback](/refs/Interface/DataDropOptions#fieldmapcallback) | [DropFieldMapCallback](/refs/realgrid#dropfieldmapcallback) | A callback that returns an object of type [FieldMap](/refs/Interface/FieldMap) and uses it as a rule |
| [labelCallback](/refs/Interface/DataDropOptions#labelcallback) | [DataDragLabelCallback](/refs/realgrid#datadraglabelcallback) | A callback to determine the label text of the item being dragged |

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [cursor](/refs/Interface/DataDropOptions#cursor) | string | Specifies the cursor when dragging. |
| [dropMode](/refs/Interface/DataDropOptions#dropmode) | [DataDropMode](/refs/realgrid#datadropmode) | data drop mode |
| [dropOtherElement](/refs/Interface/DataDropOptions#dropotherelement) | boolean | Whether to drop on another HTMLElement other than the grid |
| [dropOtherGrid](/refs/Interface/DataDropOptions#dropothergrid) | boolean | Whether to drop to another grid |
| [feedbackStyle](/refs/Interface/DataDropOptions#feedbackstyle) | [DragFeedbackStyle](/refs/realgrid#dragfeedbackstyle) | feedbackStyle |
| [fieldMap](/refs/Interface/DataDropOptions#fieldmap) | [FieldMap](/refs/Interface/FieldMap) | Field name of the grid where the drag was started - Field name of the grid to be dropped Pair |
| [proxyLabel](/refs/Interface/DataDropOptions#proxylabel) | string | Label text of the item being dragged |
| [scroll](/refs/Interface/DataDropOptions#scroll) | boolean | If `false`{/* */}, vertical grid scrolling is not performed during dragging. |

## Events Desc

### callback

A callback indicating that it was dropped

`Type` - [DataDropCallback](/refs/realgrid#datadropcallback)

**Remarks:**

Occurs when dropped. This is a variant of [DataDropCallback](/refs/realgrid#datadropcallback).

<hr/>

### dragCallback

Callback that determines drag and drop

`Type` - [DataDragCallback](/refs/realgrid#datadragcallback)

**Remarks:**

Occurs when drag starts. The format is [DataDragCallback](/refs/realgrid#datadragcallback).

<hr/>

### fieldMapCallback

A callback that returns an object of type [FieldMap](/refs/Interface/FieldMap) and uses it as a rule.

`Type` - [DropFieldMapCallback](/refs/realgrid#dropfieldmapcallback)

**Remarks:**

The format is [DropFieldMapCallback](/refs/realgrid#dropfieldmapcallback). It must be set to the grid where it will be dropped.

<hr/>

### labelCallback

A callback to determine the label text of the item being dragged.

`Type` - [DataDragLabelCallback](/refs/realgrid#datadraglabelcallback)

<hr/>

## Properties Desc

### cursor

Specifies the cursor when dragging.

`Type` - string

<hr/>

### dropMode

data drop mode

`Type` - [DataDropMode](/refs/realgrid#datadropmode)

**Remarks:**

When dropping, you can set whether to move or copy a row using the value of [DataDropMode](/refs/realgrid#datadropmode).

<hr/>

### dropOtherElement

Whether to drop on another HTMLElement other than the grid

`Type` - boolean

<hr/>

### dropOtherGrid

Whether to drop to another grid

`Type` - boolean

<hr/>

### feedbackStyle

feedbackStyle

`Type` - [DragFeedbackStyle](/refs/realgrid#dragfeedbackstyle)

**Remarks:**

Style of feedback displayed when mouse over

<hr/>

### fieldMap

Field name of the grid where the drag was started - Field name of the grid to be dropped Pair

`Type` - [FieldMap](/refs/Interface/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](/refs/Interface/FieldMap).

**Example:**


```js
{'CompanyName':'ShipAddress'}
```

<hr/>

### proxyLabel

Label text of the item being dragged

`Type` - string

**Remarks:**

If [DataDropOptions.labelCallback](/refs/Interface/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:**


```js
gridView.dataDropOptions.proxyLabel = '${rows} rows ${to} ${mode}'
// ex) 'Copy 1 row to 4'
```

<hr/>

### scroll

If `false`{/* */}, vertical grid scrolling is not performed during dragging.

`Type` - boolean

<hr/>