고정 셀에 체크박스를 설정하고 설정 여부의 값을 반환합니다.

캡션 체크박스를 체크 할 경우 그 열의 모든 체크박스가 체크되거나 해제됩니다.


요약

모든 checbox 기능을 설정합니다.

입력값

nRow : 행의 index

nCol : 열의 index

bStatus : true / false



예) SBGridID.setFixedcellcheckbox(nRow, nCol, bStatus)

상세설명

Caption 영역에 checbox 기능을 사용하도록 설정

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page language="java"   contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
	<meta content="IE=9" http-equiv="X-UA-Compatible">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>SoftBowl SBGrid Example</title>
	<script type="text/javascript" src="../../kr/co/softbowl/js/Library/json-minified.js"></script>
	<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../../kr/co/softbowl/js/Library/json2.js"></script>
		
	<script type="text/javascript" src="../../kr/co/softbowl/SBGrid.js"></script>
	
	<script type="text/javascript" src="../../js/DATA_XML_JSON_col_type_big.js"></script>
		
	<script type="text/javascript">			
		SBGrid.DEF.DOMAIN = "../../";
	<script>
	
	<script type="text/javascript">
        var datagrid1; 
		
		function __createElements() {
         var GridInitInfo = {
             "strParentId": "sbGridArea",
             "strId": "datagrid1",
             "strCaption": "checkbox^input^input button^input date^combo^output^radio",
             "strColWidth": "100,100,120,120,120,120,100,100",
             "strNodeSet": "/root/typeSample/gridData/row",
             "strStyle": "width:100%; height:480px; ",
             "strDataHeight": "29",
             "strExtendLastCol": "scroll",
             "bCreateAll": true
         };

         var SBGridColumnInitInfo = [
											{ "id": "col1", "type": "checkbox", "ref": "checkbox" },
											{ "id": "col2", "type": "input", "ref": "input", "style": "padding-left:5px" },
											{ "id": "col3", "type": "inputbutton", "ref": "inputbutton", "style": "padding-left:5px" },
											{ "id": "col4", "type": "outputbutton", "ref": "outputbutton", "style": "padding-left:5px" },
											{ "id": "col5", "type": "inputdate", "ref": "inputdate", "style": "text-align:center" },
											{ "id": "col6", "type": "combo", "ref": "combo", "strJsonNodeSet": "comboData.combo_class", "strLabelRef": "label", "strValueRef": "value", "style": "padding-left:5px" },
											{ "id": "col7", "type": "output", "ref": "output", "style": "padding-left:5px" },
											{ "id": "col8", "type": "radio", "ref": "radio" }
         ];

         datagrid1 = createSBGrid(GridInitInfo, SBGridColumnInitInfo);

         

         SBGrid.DS.XMLStorage.getUniqueStorage().getInstance().loadXML(instanceData);

         datagrid1.setFixedcellcheckbox(0, 0, true);

         datagrid1.refresh();

	     }
	     function createSBGrid(SBGridInitInfo, SBGridColumnInitInfo) {
	         var objJSONdata = new Object();
	         objJSONdata.objSBGridInitInfo = SBGridInitInfo;
	         objJSONdata.arSBGridColumnInitInfo = SBGridColumnInitInfo;
	         return SBGrid.DEF.createSBGrid(objJSONdata);
	     };
	     function checkboxINIT() {
	         datagrid1.initFixedcellcheckbox();
	     }
	     function checkboxCheck() {
	         datagrid1.setFixedcellcheckboxChecked(0, 0, true);
	     }
	     function getcheckbox() {
	         var bVal = datagrid1.getFixedcellcheckboxChecked(0, 0);
	         if (bVal == 1) {
	             $.gritter.add({
	                 title: 'Caption CheckBox 반환값',
	                 text: ' 반환값 : ' + bVal,
	                 class_name: 'gritter-light'
	             });
	
	
	         }
	         else {
	             $.gritter.add({
	                 title: 'Caption CheckBox 반환값',
	                 text: ' 반환값 : ' + bVal,
	                 class_name: 'gritter-error'
	             });
	
	         }
	         return false;
	     };
	</script>
</head> 
<body onload="__createElements()" class="sbgrid_body">
	
        <div id="button_group">
            <input type="button" class="sbgrid_demo_button" style="width:700px;height:30px;" value="Caption 체크박스 체크" onclick="checkboxCheck();"></input>
            <input type="button" class="sbgrid_demo_button" style="width:348px;height:30px;" value="Caption 체크박스 초기화" onclick="checkboxINIT();"></input>
            <input type="button" class="sbgrid_demo_button" style="width:348px;height:30px;" value="Caption 체크박스 상태 반환" onclick="getcheckbox();"></input>
        </div>
        <div class="content_group">
            <div id="sbGridArea"></div>
        </div>
    		
</body>
</html>