728x90
내가 구현하고 싶은 그리드 형태

바인드한 데이터셋 구조

- 그리드 내 셀을 트리 형태로 바꾸기
- 트리 구조로 데이터를 보여주고 싶은 컬럼의 셀을 선택
- Action>displaytype: treeitemcontr
- Action>edittype: tree
- CellTreeItem>treelevel: 바인드한 데이터셋 중 레벨 값으로 사용할 컬럼ID 설정
- 트리 상태 값 설정
- CellTreeItem>treestatus
속성값 | 설명 |
0 | 트리가 닫힌 상태 |
1 | 트리가 열린 상태 |
3 | 트리가 단말(leaf) 상태 |
- 최초 로드 시, 트리 상태 설정
- 그리드 선택>CellTreeItem>treeinitstatus
속성값 | 설명 |
expand, all | 모든 트리가 열린 상태로 로딩 |
collapse, all | 모든 트리가 닫힌 상태로 로딩 |
- 트리 내 체크박스 없애기
- 그리드 선택>CellTreeItem>treeusecheckbox: false
셀 클릭으로 트리 상태를 제어하는데 버튼도 보여줄 경우엔 edittype을 none으로 변경
//셀 클릭 시, 트리 열고 닫기
this.grid_oncellclick = function(obj:nexacro.Grid, e:nexacro.GricdClickEventInfo) {
var gridRow = this.grid.getTreeRow(e.row);
var treeStatus = this.grid.getTreeStatus(gridRow);
if(treeStatus == 3) return;
treeStatus = (treeStatus == 0 ? 1 : 0);
this.grid.setTreeStatus(gridRow, treeStatus);
};
728x90
'넥사크로' 카테고리의 다른 글
[nexacro] 넥사크로 라이선스 갱신 오류 (0) | 2025.02.04 |
---|---|
[nexacro] 넥사크로 CSS 관련 정리 (0) | 2024.09.06 |
[nexacro] 트랜잭션(Transaction) (0) | 2024.05.28 |
[nexacro] WebBrowser컴포넌트 (내 로컬에선 잘 되는데 운영은 왜 안 돼) (0) | 2024.03.11 |
[nexacro] 넥사크로 라이선스 갱신(invalid license key) (0) | 2024.03.11 |