var datagrid; var SBGridProperties = {}; function createGrid() { SBGridProperties.parentid = 'SBGridArea'; SBGridProperties.id = 'datagrid'; SBGridProperties.jsonref = 'treeData'; SBGridProperties.selectmode = 'byrow'; SBGridProperties.extendlastcol = 'scroll'; SBGridProperties.tree = { col: 0, levelref: 'level', open: false, lock: true }, SBGridProperties.columns = [ {caption:['부/청'], ref:'org0', width:'250px', style:'text-align:left', type:'output'}, {caption:['웹사이트'], ref:'org1', width:'200px', style:'text-align:left', type:'input'}, {caption:['주소'], ref:'org2', width:'450px', style:'text-align:left', type:'textarea'} ]; datagrid = _SBGrid.create(SBGridProperties); }; function fnOpenTreeNode() { var row = datagrid.getRow(); if (row >= datagrid.getFixedRows()) { datagrid.openTreeNode(row); } else { alert("노드를 선택하세요."); } }