function createGrid(){ var SBGridProperties = {}; SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.backcoloralternate = '#f4f4f4'; SBGridProperties.jsonref = 'groupData'; SBGridProperties.rowheight = 25; SBGridProperties.emptyrecords = '조회된 자료가 존재하지 않습니다.';//레코드가 없을경우 출력되는 메시지 SBGridProperties.explorerbar = 'move'; SBGridProperties.waitingui = true; SBGridProperties.extendlastcol = 'scroll'; SBGridProperties.columns = [ {caption : ['수입/지출구분'], ref : 'impExpSeNm', width : 120, type : 'output', style : 'text-align:center'}, {caption : ['표준/연구회구분'], ref : 'insnSeNm', width : 120, type : 'output', style : 'text-align:center'}, {caption : ['관항목세목구분'], ref : 'lowcdnm', width : 120, type : 'output', style : 'text-align:center'}, {caption : ['코드'], ref : 'code', width : 100, type : 'output', hidden:true}, {caption : ['코드명'], ref : 'codeName', width : 500, type : 'output'}, {caption : ['lowcd'], ref : 'lowcd', width : 100, type : 'output', hidden:true}, {caption : ['topcd'], ref : 'topcd', width : 100, type : 'output', hidden:true}, {caption : ['lowgb'], ref : 'lowgb', width : 100, type : 'output', hidden:true}, {caption : ['insnSe'], ref : 'insnSe', width : 100, type : 'output', hidden:true}, {caption : ['impExpSe'], ref : 'impExpSe', width : 100, type : 'output', hidden:true}, {caption : ['lv'], ref : 'lv', width : 100, type : 'output', hidden:true}, {caption : ['lvCodeName'], ref : 'lvCodeName', width : 100, type : 'output', hidden:true}, {caption : ['codepathgb'], ref : 'codepathgb', width : 100, type : 'output', hidden:true}, {caption : ['codepathgbnm'], ref : 'codepathgbnm', width : 100, type : 'output', hidden:true}, {caption : ['cdName'], ref : 'cdName', width : 100, type : 'output', hidden:true} ]; datagrid = _SBGrid.create(SBGridProperties); setGroup(datagrid); } function setGroup(objGrid){ objGrid.setGroup({ type:'custom', //every 하나의 열에 각 level을 접고 펼치는 UI를 모두 표시, /*each:level별로 각각의 열에 접교 펼치는 UI 제공, custom : 특정 level값을 데이터에 저장하여 해당 값을 가지고 그룹 적용*/ typeinfo:{ // 그리드 그룹 type 속성별로 종속 속성 설정 levelcolid : objGrid.getColID(objGrid.getColRef('lv')) //custom 설정시 특정 level 값을 저장하는 열에 아이디 지정 }, columns:[ //each, every, 설정시 레벨 열 설정 { colid : objGrid.getColID(objGrid.getColRef('codeName')), //레벨 열의 열 아이디 설정 open : true // 그룹화 후 그룹 오픈 여부 설정 } ] }, true); //그리드 락 유아이 표시 여부 디폴트 false };