트리 » Api

getchilditemcountex

Description

지정한 아이템이 자식 아이템 갯수를 리턴하는 API이다.

Parameters

Parameters Type Description
strKey STRING 트리 아이템 키값
bAllChild BOOL [옵션] 모든 자식 아이템 갯수 여부 (기본값: true)

Return Value

Type Description
long 자식 아이템 갯수

Remark

bAllChild 파라미터가 fale인 경우, 한단계 자식 아이템 갯수를 리턴한다.

lItem 파라미터가 유효하지 않은 경우, -1이 리턴된다.

Example

function btn_on_mouseup() { // 키값을 가지는 아이템 추가 trTest.insertitemex("addtree", "treekey", 0, 1, "", ""); // "treekey" 키값의 아이템을 부모로 하는 아이템 추가 trTest.insertitemex("subnode1", "subnode1key", 1, 1, "treekey", ""); var nChildItemCount = trTest.getchilditemcountex("treekey"); if(nChildItemCount > 0){ screen.alert("자식 아이템이 있습니다."); } }

See Also

getchilditemcount

Viewer Ver.

9.1.1.1

Update Date

20200218