var datagrid;
var SBGridProperties = {};
function createGrid() {
SBGridProperties.parentid = 'SBGridArea';
SBGridProperties.id = 'datagrid';
SBGridProperties.jsonref = 'groupData';
SBGridProperties.selectmode = 'byrow';
SBGridProperties.extendlastcol = 'scroll';
SBGridProperties.columns = [
{caption : ['수입/지출'], ref : 'impExpSeNm', width : 120, type : 'output', style : 'text-align:center'},
{caption : ['관/항/목/세목'], ref : 'lowcdnm', width : 150, type : 'output', style : 'text-align:center'},
{caption : ['표준/연구회'], ref : 'insnSeNm', width : 120, type : 'output', style : 'text-align:center'},
{caption : ['코드명'], ref : 'codeName', width : 500, type : 'output'},
{caption : ['lv'], ref : 'lv', width : 100, type : 'output', hidden : true}
];
datagrid = _SBGrid.create(SBGridProperties);
datagrid.setGroup({
type: "each",
columns: [
{
colid: datagrid.getColID(datagrid.getColRef('impExpSeNm')),
open: true
},
{
colid: datagrid.getColID(datagrid.getColRef('lowcdnm')),
open: true
}
]
}, true);
};
function fnGetGroupNodeCount() {
var row = datagrid.getRow();
var count = datagrid.getGroupNodeCount(row);
if (row >= datagrid.getFixedRows()) {
alert(count);
} else {
alert("데이터 영역 행을 선택하세요.");
}
}