var datagrid; var SBGridProperties = {}; var arrData = [ ['청량도우리이발기술학원','박영배','02-969-5025','서울특별시 동대문구 왕산로33길 32 , 2층 (제기동)','이·미용','이발기술','20','1개월 0일','20170331','3780','300000','1'], ['대성회계실무학원','대성회계실무학원(주)','02-966-8400','서울특별시 동대문구 왕산로 225 , 5층2호, 5층6호 (청량리동)','종합(대)','전산회계1급','17','1개월 0일','20170331','4140','440920','5'] ]; function createGrid(){ SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.jsonref = 'arrData'; SBGridProperties.rowdatatype = 'array'; SBGridProperties.rowheader =['seq', 'update']; SBGridProperties.selectmode = 'free'; SBGridProperties.columns = [ {caption : ['학원명'], ref : 0, width : '150px', style : 'text-align:left', type : 'output'}, {caption : ['설립자(성명)'], ref : 1, width : '150px', style : 'text-align:left', type : 'input'}, {caption : ['전화번호'], ref : 2, width : '120px', style : 'text-align:center', type : 'input'}, {caption : ['학원주소'], ref : 3, width : '450px', style : 'text-align:left', type : 'textarea'}, {caption : ['교습과정'], ref : 4, width : '100px', style : 'text-align:center', type : 'output'}, {caption : ['교습과목(반)'], ref : 5, width : '200px', style : 'text-align:center', type : 'input'}, {caption : ['정원'], ref : 6, width : '70px', style : 'text-align:right', type : 'input', format : {type:'string', rule:'@ "명"'}}, {caption : ['교습기간'], ref : 7, width : '100px', style : 'text-align:right', type : 'input'}, {caption : ['교육시작일'], ref : 8, width : '100px', style : 'text-align:center', type : 'datepicker', typeinfo : {locale : 'ko' , dateformat :'yymmdd'}, format : {type:'date', rule:'yyyy-mm-dd', origin : 'yyyymmdd' }}, {caption : ['총교습시간(분)'], ref : 9, width : '100px', style : 'text-align:right', type : 'input'}, {caption : ['교습비'], ref : 10, width : '100px', style : 'text-align:right', type : 'input', format : {type:'number', rule:'#,###'}}, {caption : ['강사수'], ref : 11, width : '70px', style : 'text-align:right', type : 'input'} ]; datagrid = _SBGrid.create(SBGridProperties); };