멀티라인그리드 » Event

on_itemeditshow

Description

그리드 아이템이 편집 상태가 시작/종료 시점에 발생하는 이벤트이며, 자세한 내용은 샘플 소스를 참조한다.

Parameters

Parameters Type Description
objInst INSTANCE 이벤트가 발생한 오브젝트
nRow long 그리드 행 인덱스 (Zero-Based)
nSubRow short 그리드 서브행 인덱스 (Zero-Based)
nColumn short 그리드 열 인덱스 (Zero-Based)
bShowEdit BOOL 편집 상태 시작/종료 여부

Return Value

Type Description
void

Remark

이벤트가 발생하기 위해서는 아이템이 편집 가능한 상태이어야 한다.

편집 모드가 시작될 때 기본 동작은, 기존 텍스트는 모두 선택되어 지고, 커서는 맨 마지막에 위치한다.

on_itemeditshow 이벤트를 이용하면 편집 모드가 시작될 때, 커서 위치나, 텍스트 선택 형태를 변경할 수 있다.

또한 예제와 같이 원본 데이터와 표시용 데이터를 분리하여 처리할 수도 있다.

Example

/**
 * 그리드 아이템이 편집 상태가 시작/종료 시점에 발생하는 이벤트
 *
 * @param {Object} objInst 그리드 컴포넌트 인스턴스
 * @param {number} nRow 그리드 행 인덱스 (Zero-Based)
 * @param {number} nSubRow 그리드 서브행 인덱스 (Zero-Based)
 * @param {number} nColumn 그리드 열 인덱스 (Zero-Based)
 * @param {boolean} bShowEdit 편집 시작/종료 여부
 */
function grdNormal_on_itemeditshow(objInst, nRow, nColumn, bShowEdit)
{
	factory.consoleprint("on_itemeditshow> Start");
	factory.consoleprint("on_itemeditshow> Grid Object Name = " + objInst.getname());
	factory.consoleprint("on_itemeditshow> nRow = " + nRow);
	factory.consoleprint("on_itemeditshow> nSubRow = " + nSubRow);
	factory.consoleprint("on_itemeditshow> nColumn = " + nColumn);
	factory.consoleprint("on_itemeditshow> bShowEdit = " + bShowEdit);
}

See Also

on_itemeditcomplete
setitemeditsel

Viewer Ver.

9.1.1.1

Update Date

20230612