DropFieldMapCallback

그리드 간 drag and drop 으로 이동 / 복사를 할 때 적용되는 규칙을 반환하는 콜백 형식

타입

export type DropFieldMapCallback = (source: GridBase, sourceItems: number[], target: GridBase, targetItem: number, targetColumn: string) => FieldMap;

상세 설명

[매개변수 목록]

source - 드래그한 아이템이 있던 GridBase 컨트롤

sourceItems - 드래그한 그리드의 아이템들의 인덱스

target - 드랍할 GridBase 컨트롤

targetItem - 드랍할 그리드에서의 아이템 인덱스

targetColumn - 드랍할 그리드에서의 targetColumn

[반환값] - FieldMap 오브젝트

예제 코드

gridView.dataDropOptions.fieldMapCallback = function (source, sourceItems, target, targetItem) {
    if (targetItem % 2 == 0) {
        return {
            Country: "Country",
            CompanyName: "ShipAddress",
            EmployeeID: "ShipPostalCode"
        }
    }
}