RealGrid2 API
Interface
DataDropOptions

DataDropOptions

다른 그리드에서 drag 된 데이터를 처리하는 방식에 대한 설정 모델

Signature:

export interface DataDropOptions 

Remarks

callback 이 지정되지 않은 경우, fieldMap 이나 fieldMapCallback 에 설정된대로 동작한다.

아무것도 지정되지 않은 경우 필드명이 같은 필드들의 값을 dropMode 에 따라 이동 / 복사한다.

EditOptions.movabletrue 여야한다.

그리드 에서 옵션으로 설정할 때는 필요한 정보만 넣으면 된다.

Example

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

Events

PropertyModifiersTypeDescription
callbackDataDropCallbackdrop 했음을 알리는 콜백
dragCallbackDataDragCallbackdrag and drop 을 결정하는 콜백
fieldMapCallbackDropFieldMapCallbackFieldMap 형식의 오브젝트를 반환하여 규칙으로 사용하는 콜백
labelCallbackDataDragLabelCallbackdrag 중인 item 의 label 텍스트를 결정하기 위한 콜백

Properties

PropertyModifiersTypeDescription
cursorstringdrag중일때 커서를 지정한다.
dropModeDataDropMode데이터 drop 모드
dropOtherElementboolean그리드가 아닌 다른 HTMLElement에 drop여부
feedbackStyleDragFeedbackStylefeedbackStyle
fieldMapFieldMapdrag 를 시작한 그리드의 필드명 - drop 할 그리드의 필드명 쌍
proxyLabelstringdrag 중인 item 의 label 텍스트
scrollbooleanfalse이면 drag중에 그리드 수직 스크롤이 실행되지 않도록 한다.

Events Desc

callback

drop 했음을 알리는 콜백

Remarks:

drop 시 발생한다. DataDropCallback 의 형삭이다.

dragCallback

drag and drop 을 결정하는 콜백

Remarks:

drag 시작 시 발생한다. DataDragCallback 의 형식이다.

fieldMapCallback

FieldMap 형식의 오브젝트를 반환하여 규칙으로 사용하는 콜백

Remarks:

DropFieldMapCallback 의 형식이다. drop 될 그리드에 설정해야한다.

labelCallback

drag 중인 item 의 label 텍스트를 결정하기 위한 콜백

Properties Desc

cursor

drag중일때 커서를 지정한다.

dropMode

데이터 drop 모드

Remarks:

drop 시 DataDropMode 의 값으로 행 이동할 것인지 복사할 것인지 설정 가능하다.

dropOtherElement

그리드가 아닌 다른 HTMLElement에 drop여부

feedbackStyle

feedbackStyle

Remarks:

mouse over시 표시되는 feedback의 style

fieldMap

drag 를 시작한 그리드의 필드명 - drop 할 그리드의 필드명 쌍

Remarks:

callback 이나 feildMapcallback 이 설정되지 않았을 경우에 이 값을 따른다. FieldMap 형식으로 drop 될 그리드에 설정해야한다.

Example:

{'CompanyName': 'ShipAddress'}

proxyLabel

drag 중인 item 의 label 텍스트

Remarks:

DataDropOptions.labelCallback 이 설정되지 않았을 경우에 이 값을 따른다.

[사용 가능 표현 목록]

${rows} - 드래그 된 아이템의 개수

${mode} - 현재 dropMode

${from} - 드래그 된 위치 (인덱스)

${to} - 복사 혹은 이동 될 위치 (인덱스)

Example:

gridView.dataDropOptions.proxyLabel = '${rows} 개 행을 ${to} 로 ${mode}'
// ex)  '1 개 행을 4 로 복사'

scroll

false이면 drag중에 그리드 수직 스크롤이 실행되지 않도록 한다.