SMART datagrid v1.4 > Classes > GridBase

[ grids ver.1.3.9]   Back  Forward

DataLudi.GridBase.onCopy  event

사용자가 Ctrl+C나 *Cmd+C"를 입력해서 선택 영역을 클립보드로 복사하기 직전에 발생한다. 

이벤트 핸들러 내에서 명시적으로 Boolean false를 리턴하면 복사가 취소된다. 또, 선택 영역이 복수로 존재할 때 마지막 선택한 영역만 복사된다. 

function onCopy (grid: GridBase, range: CellRange|CellIndex, data: String): Boolean;
Returns
Boolean - Boolean false를 리턴하면 복사가 취소된다.
Parameters
grid - GridBase.
range - CellRange|CellIndex.
복사할 영역. 단일 셀이면 CellIndex, 다중 셀 영역이면 CellRange 객체.
data - String.
클립보드로 전달될 텍스트.
Code -1
    grid.onCopy = function (grid, range, data) {
        return $('#chkCopy')[0].checked;
    };
See Also
onPaste
onPasted
Examples
Clipboard Copy
Clipboard Paste
Multiple Selection