트리그리드 » Api

insertitem

Description

트리 그리드의 트리에 새로운 아이템을 추가하는 API이다.

파라미터 strInsertAfterItemKey는 옵션 파라미터로 해당 아이템 다음에
새 아이템이 추가된다. 이값을 strParentKey와 동일한 값으로 주면 해당 부모 아이템
아래 첫번째로 추가된다. 이 파라미터 값을 주지 않으면 기본은 부모아이템 아래 제일
마지막 자식 아이템으로 추가된다.

Parameters

Parameters Type Description
strText STRING 아이템 텍스트
nImageIndex short 아이템 이미지 인덱스
nSelectImageIndex short 선택된 아이템 이미지 인덱스
strKey STRING 아이템 키
strParentKey STRING 아이템이 추가될 부모 아이템 키
strInsertAfterItemKey STRING 해당 아이템 다음에 추가 [옵션]

Return Value

Type Description
long 추가된 아이템 로우 인덱스

Remark

만약 많은 수의 행에 대해서 루핑 돌면서 호출하는 경우라면, insertitemtext API의 bRefresh 파라미터를 false로 지정하여 호출하고, 루핑처리 끝난 이후에 그리드 refresh 함수를 호출하는 것이 속도면에서 훨씬 빠릅니다.

Example

function btn_insertitem_on_mouseup() { tgrdTest.insertitem("treeNode", 0, 2, "treekey", ""); }

See Also

deleteitem

Viewer Ver.

9.1.1.1

Update Date

20220623