트리뷰 » Api

setrootrowindex

Description

트리뷰의 루트로 지정할 데이터 행 인덱스를 지정하는 API이다.
연결된 데이터셋에서 해당 데이터를 기준으로 하위메뉴를 생성한다.
nRowIndex에 -1 지정시, 기본동작으로 복원한다.

Parameters

Parameters Type Description
nRowIndex long 루트로 지정할 데이터 행 인덱스

Return Value

Type Description
BOOL 정상 처리 여부

Remark

** item_display_mode 속성이 1:api인 경우, refresh API를 호출해야 적용된 내용이 반영되어 표시된다.

Example

function treeview01_on_itemclick(objInst, index, depth, type) { var row_index = treeview01.getitemrowindex(index); if (depth == 1 && row_index >= 0) { // treeview01에서 선택한 아이템을 기준으로 treeview02의 트리메뉴를 표시 treeview02.setrootrowindex(row_index); } } function btn_on_click(objInst, index, depth, type) { // 연결된 데이터셋의 내용을 그대로 표시 treeview02.setrootrowindex(-1); }

Viewer Ver.

9.1.1.1

Update Date

20211104