이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== 그리드 통계행 컬럼별 통계 계산 가이드 ====== 그리드 컴포넌트의 통계행의 컬럼별 통계 데이터 계산 기능 예시 화면이다. 통계행은 그리드 내부 데이터를 기준으로 그리드 컴포넌트에서 자동으로 통계 데이터를 계산하여 표시하는 기능을 제공한다. 통계행의 통계 유형(operation 속성)이 "5:컬럼별 정의"인 경우, 데이터부의 statisticsrow_type 속성을 기준으로 계산된다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/GRID/grid_statrow_column 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/GRID/grid_statrow_column.xml|grid_statrow_column.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/GRID/grid_statrow_column.js|grid_statrow_column.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/GRID/grid_statrow_column|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/GRID/grid_statrow_column"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // "setcolumnstatrowtype" 버튼 이벤트 function btn_setcolumnstatrowtype_on_click(objInst) { var stat_type, stat_comment; // 컬럼 데이터부 statisticsrow_type 속성 로깅 stat_type = grdList.getcolumnstatrowtype(1); factory.consoleprint("before column statisticsrow_type = " + stat_type); // 통계 유형의 콤보박스에서 선택한 코드/코멘트 값을 구함 stat_type = cbo_stattype.getselectedcode(); stat_comment = cbo_stattype.getselectedcomment(); factory.consoleprint("column statisticsrow_type = " + stat_type + ", stat_comment = " + stat_comment); // 헤더 텍스트 변경 grdList.setheadertext(0, 1, "통계행 컬럼별 - " + stat_comment); // 컬럼 데이터부 statisticsrow_type 속성 변경 grdList.setcolumnstatrowtype(1, stat_type); grdList.refresh(false); // 컬럼 데이터부 statisticsrow_type 속성 로깅 stat_type = grdList.getcolumnstatrowtype(1); factory.consoleprint("after column statisticsrow_type = " + grdList.getcolumnstatrowtype(1)); } </sxh> guide/component/grid/grid_statrow_column.txt 마지막으로 수정됨: 2023/08/28 15:47저자 127.0.0.1