var datagrid; var SBGridProperties = {}; function createGrid(){ SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.jsonref = 'ct_data.resources'; SBGridProperties.selectmode = 'free'; SBGridProperties.rowheader = ['seq', 'update']; SBGridProperties.columns = [ {caption : ['학원명'], ref : 'academy', width : '200px', style : 'text-align:center', type : 'input'}, {caption : ['정원'], ref : 'maxstudent', width : '70px', style : 'text-align:center', type : 'input'}, {caption : ['총교습시간(분)'], ref : 'totalminute', width : '100px', style : 'text-align:center', type : 'input'}, {caption : ['교습비'], ref : 'pay', width : '100px', style : 'text-align:center', type : 'input'}, {caption : ['강사수'], ref : 'teacher', width : '70px', style : 'text-align:center', type : 'input'} ]; datagrid = _SBGrid.create(SBGridProperties); $('#textValue').text('셀을 클릭하고 버튼을 눌러 셀에 적용된 format 을 확인해보세요.'); }; function getCellFormat1(){ var nRow = datagrid.getRow(); var nCol = datagrid.getCol(); alert( JSON.stringify(datagrid.getCellFormat(nRow,nCol)) ); }; function setCellFormat1(){ var nRow = datagrid.getRow(); var nCol = datagrid.getCol(); datagrid.setCellFormat(nRow,nCol,$('#tValue').val(),true); };