var datagrid;
var SBGridProperties = {};
function createGrid() {
SBGridProperties.parentid = 'SBGridArea';
SBGridProperties.id = 'datagrid';
SBGridProperties.jsonref = 'groupData';
SBGridProperties.selectmode = 'free';
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);
fnSetGroup("every");
};
function fnSetGroup(groupType) {
var groupinfo;
if (groupType === "custom") {
groupinfo = {
type: groupType,
typeinfo: {
levelcolid: datagrid.getColID(datagrid.getColRef('lv'))
},
columns: [
{
colid: datagrid.getColID(datagrid.getColRef('codeName')),
open: false
}
]
};
} else {
groupinfo = {
type: groupType,
columns: [
{
colid: datagrid.getColID(datagrid.getColRef('impExpSeNm')),
open: true
},
{
colid: datagrid.getColID(datagrid.getColRef('lowcdnm')),
open: false
}
]
};
}
datagrid.setGroup(groupinfo, true);
}