이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== 그리드 정렬 기본 가이드 ====== 그리드 정렬 기능은 조회된 그리드 데이터를 기준으로 데이터를 정렬하여 표시하는 기능이다. 그리드 단일 컬럼 정렬은 헤더 클릭을 통해서 수행한다. 그리드 멀티 컬럼 정렬은 CTRL+헤더 클릭을 통해서 수행한다. 관련 속성으로 column_sort, column_sort_disp, header_clicksort, header_clicksort_release, header_clicksort_order가 있다. 관련 데이터부 속성으로 sorting, sort_datatype, sort_func이 있다. 관련 API로 getcolumnsortdisp, setcolumnsortdisp, getheaderclicksort, setheaderclicksort가 있다. 관련 API로 getheaderclicksortrelease, setheaderclicksortrelease, releasesort가 있다. 관련 이벤트로 on_sortcomplete가 있다. 관련 실행파라미터로 GRID_HEADERCLICK_SORTRELEASE, GRID_SORTSTARTORDER_ASCENDING이 있다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/GRID/grid_sort_basic 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/GRID/grid_sort_basic.xml|grid_sort_basic.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/GRID/grid_sort_basic.js|grid_sort_basic.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/GRID/grid_sort_basic|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/GRID/grid_sort_basic"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // 그리드 on_sortcomplete 이벤트 function grd_on_sortcomplete(objInst, nSortStartTime, nSortEndTime) { factory.consoleprint("정렬 처리 시간: " + (nSortEndTime - nSortStartTime) + "ms"); } // "setcolumnsortdisp" 버튼 이벤트 function btn_setheaderclicksort_on_click(objInst) { // "header_clicksort" 속성 토글 처리 this.grd.setheaderclicksort(!this.grd.getheaderclicksort()); } // "releasesort" 버튼 이벤트 function btn_releasesort_on_click(objInst) { // 그리드 정렬 초기화 this.grd.releasesort(); } </sxh> guide/component/grid/grid_sort_basic.txt 마지막으로 수정됨: 2023/12/13 19:27저자 127.0.0.1