CopyTextCallback

그리드를 복사할때 클립보드에 저장되는 text를 반환하는 콜백 형식

타입

export type CopyTextCallback = (grid: GridBase, itemIndex: number, column: ValueColumn, value: any) => string;

상세 설명

CopyOptions.copyTextCallback에서 사용된다.

[매개변수 목록]

grid - GridBase 컨트롤

itemIndex - 복사되는 행의 itemIndex

column - DataColumn 객체

[반환값] - 클립보드에 복사될 text undefined 를 return 하면 value 또는 copyOptions의 다른 설정값에 따른 text가 복사된다.

예제 코드

const f = function(grid, itemIndex, column, value) {
     if (value != null && column.name === "number1") {
         return value + "";
     }
}
grid.copyOptions.copyTextCallback = f;