var datagrid; var SBGridProperties = {}; var inputTemp = [{},{},{},{},{},{},{},{},{},{}]; var autocompleteData = ["A-1", "A-2", "A-3", "A-4", "A-5", "B-1", "B-2", "B-3"]; function createGrid() { SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.jsonref = 'inputTemp'; SBGridProperties.rowheader = ['seq','update']; SBGridProperties.selectmode = 'free'; SBGridProperties.extendlastcol = 'scroll'; SBGridProperties.fixedrowheight = 50; SBGridProperties.columns = [ {caption : ['inputbutton\n(기본형)'], type : 'inputbutton', typeinfo : {callback : fnCallback}, ref : 'temp1', width : '220px', style : 'text-align:center'}, {caption : ['maxlength\n(5자 제한)'], type : 'inputbutton', typeinfo : {maxlength:5, callback : fnCallback}, ref : 'temp2', width : '220px', style : 'text-align:center'}, {caption : ['oneclickedit\n(true)'], type : 'inputbutton', typeinfo : {oneclickedit : true, callback : fnCallback}, ref : 'temp3', width : '220px', style : 'text-align:center'}, {caption : ['autocomplete\n(자동 완성)'], type : 'inputbutton', typeinfo : {autocomplete : autocompleteData, callback : fnCallback}, ref : 'temp4', width : '220px', style : 'text-align:center'}, ]; datagrid = _SBGrid.create(SBGridProperties); }; function fnCallback() { var nRow = datagrid.getRow(); var nCol = datagrid.getCol(); var textVal = datagrid.getCellData(nRow, nCol); alert('선택하신 '+nRow+' 행 '+nCol+' 열 의 데이터 값은 "'+textVal+'" 입니다.'); }