반응형
ex) CORP, DEPT별 소계 표현하기
// G: 그룹핑; CORP 내림차순, DEPT 오름차순
this.dataset.set_keystring("G:-CORP,+DEPT");
// 그룹핑하면 Level 갖게됨.
// 소계이면 -> CORP + sum 으로 / 소계 아니면 그냥 찍어주기.
var sExpr = "expr:(dataset.getRowLevel(currow) == 2 ? CORP+' Sum' : CORP)";
this.grid.setCellProperty("body", 0, "text", sExpr);
sExpr = "expr:(dataset.getRowLevel(currow) == 0 ? DEPT : (dataset.getRowLevel(currow) ==
this.grid.setCellProperty("body", 1, "text", sExpr);
ex) Summary 밴드 추가하고 SALARY 총 합계 나타내기
this.grid.appendContentsRow("summary"); // 마우스 눌러서 add Summary Row 한 것과 동일 기능.
this.grid.setCellProperty("summary", 4, "text", this.dataset.getSum("SALARY"));
ex) 소계와 Summary 밴드를 상단에 표현하기
// 직접 세팅 방법: Misc - reversesubsum - true
this.dataset.set_reversesubsum(true); // 상단으로 보내기
// 직접 세팅 방법: Grid - Appearance - summarytype - top
this.grid.set_summarytype("top");
'Nexacro > 예제' 카테고리의 다른 글
[Nexacro] 타이머 (0) | 2021.11.24 |
---|---|
[Nexacro] Form 예제 - 폼의 오브젝트/컴포넌트 정보 구하기 (0) | 2021.11.24 |
[Nexacro] String을 Object로 바꾸는 방법 (eval / this.components) (0) | 2021.11.24 |
[Nexacro] Container 컴포넌트 - PopupDiv 예제 모음 (0) | 2021.11.24 |
[Nexacro] 그리드 비어있는 부분 채우기 / 그리드 cell 선택 / 등등... (0) | 2021.11.24 |
댓글