트리메뉴 » 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 treemenu01_on_itemclick(objInst, index, depth, type)
{
var row_index = treemenu01.getitemrowindex(index);
if (depth == 1 && row_index >= 0) {
// treemenu01에서 선택한 아이템을 기준으로 treemenu02의 트리메뉴를 표시
treemenu02.setrootrowindex(row_index);
}
}
function btn_on_click(objInst, index, depth, type)
{
// 연결된 데이터셋의 내용을 그대로 표시
treemenu02.setrootrowindex(-1);
}
Viewer Ver.
9.1.1.1
Update Date
20211019