var datagrid; var SBGridProperties = {}; function createGrid(){ SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.jsonref = 'ct_data.resources'; SBGridProperties.showselectedcellsinfo = ["count","sum","avg"]; SBGridProperties.extendlastcol="scroll"; SBGridProperties.selectmode = "free"; SBGridProperties.rowheader = ['seq', 'update']; SBGridProperties.columns = [ {caption : [''], ref : 'check', width : '30px', style : 'text-align:center', type : 'checkbox'}, {caption : ['학원명'], ref : 'academy', width : '300px', style : 'text-align:left', type : 'input'}, {caption : ['설립자(성명)'], ref : 'name', width : '250px', style : 'text-align:left', type : 'output'}, {caption : ['강사수'], ref : 'teacher', width : '100px', style : 'text-align:right', type : 'output', format : {type:'string', rule:'@"명"'}}, {caption : ['교습비'], ref : 'pay', width : '200px', style : 'text-align:right', type : 'output', format:"#,###"} ]; datagrid = _SBGrid.create(SBGridProperties); $('#textValue').text('하단설정 후 "getShowSelectedCellsInfo" 버튼을 클릭해 주세요'); }; function cellInfo(){ var value = $("#tValue").val(); datagrid.setShowSelectedCellsInfo(["count",value]); } function getCellInfo(){ var cellInfo = datagrid.getShowSelectedCellsInfo(); $('#textValue').text('설정된 값은'+cellInfo+'입니다.'); }