function setSubtotal(strPosition){
if(datagrid_st != undefined){
datagrid_st.clear();
}
var sbSubtotalAttr = {
"strId" : "datagrid"
, "strPosition" : strPosition
};
datagrid_st = new sbSubtotal(sbSubtotalAttr);
//총계
datagrid_st.setSubtotal(
{
"nCompareCol" : -1 //비교할 열: -1로 지정한 이유는 default값을 주기위해서
, "arrSubtotalCols" : [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] // subtotal을 적용할 열
, "arrCalcType" : ["sum"] // subtotal 계산 타입
, "strStyle" : "background-color:#92B2C5;font-weight:bold;color:rgb(255,255,255);"
, "arrTitleCols" : [2] //타이틀이 들어갈 열
, "arrTitle" : ["총계"] // 타이틀에 들어갈 열의 값
, "bRefresh" : true //Refresh 여부
, "nStyleStart" : 0 //지정한 스타일 시작 열
}
);
//소계
datagrid_st.setSubtotal(
{
"nCompareCol" : 1 //비교할 열
, "arrSubtotalCols" : [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] //subtotal을 적용할 열
, "arrCalcType" : ["sum"] // min,max,average
, "strStyle" : "background-color:#92B2C5;font-weight:bold;color:rgb(255,255,255);" //스타일
, "arrTitleCols" : [0,1,2] // arrTitle이 들어갈 열의 index
, "arrTitle" : ["@","@","$ 소계"] // @ < 표시는 비교할 열의 title을 받아서 작성 / $ < 비교하는 열-1 열의 title을 받아서 작성
, "bRefresh" : true
, "nStyleStart" : 1
}
);
}