트리그리드 » Api

getitemoffset

Description

그리드 특정 아이템의 화면 기준 오프셋 정보를 반환하는 API이다.

Parameters

Parameters Type Description
nRow long 행 인덱스
nColumn short 컬럼 인덱스

Return Value

Type Description
class 그리드 아이템 오프셋 정보 오브젝트

Remark

현재 화면에 보여지는 아이템에 대해서만 동작하며, 보여지지 않은 아이템 이거나, 파라미터가 유효하지 않은 경우 null이 리턴된다.

반환되는 오프셋 정보 오브젝트 구조는 아래와 같다.

offset_info = {
    width: 0, // 아이템 Width
    height: 0, // 아이템 Height
    offset_x: 0, // 화면 기준 X 좌표
    offset_y: 0  // 화면 기준 Y 좌표
}

Example

function grd_on_itemclick(objInst, nClickRow, nClickColumn) { var item_offset = this.grd.getitemoffset(nClickRow, nClickColumn); if (item_offset) { factory.consoleprint("item_offset.offset_x = " + item_offset.offset_x); factory.consoleprint("item_offset.offset_y = " + item_offset.offset_y); factory.consoleprint("item_offset.width = " + item_offset.width); factory.consoleprint("item_offset.height = " + item_offset.height); } }

See Also

factory.getcontroloffset

Viewer Ver.

24.6.24.1

Update Date

20240624