Rows 숨기기
SBGrid는 행 숨기기 기능을 제공합니다.
요약
특정 행을 숨기거나 숨겨진 행을 다시 보여지게 합니다.입력값
Number : 숨길 Rows 의 Index
Boolean : true : 행 숨김 / false : 행을 숨기지 않음
예) datagrid1.setRowHidden(3,true)
상세설명
setRowHidden 의 첫번째 값으로 숨길 Row 의 Index 와 두번째 값으로 숨김여부를 입력합니다.<!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_JSON_POI_100.js"></script> <script type="text/javascript"> SBGrid.DEF.DOMAIN = "../../"; <script> <script type="text/javascript"> var datagrid1; $(document).ready(function () { __createElements(); }); function __createElements (){ var objJson = { "strParentId" : "sbGridArea", "strId": "datagrid1", "strCaption": "Longitude^Latitude^Name^City Code^classification", "strColWidth": "100, 100, 280, 120, 98", "strJsonRef": "grid_data", "strStyle": "width:700px; height:225px; ", "strBackColorAlternate" : "#EFE0ED" }; datagrid1 = createSBDataGrid(objJson); var objCol = [ { "id": "col1", "type": "input", "ref": "x", "style" : "text-align:center" }, { "id": "col2", "type": "input", "ref": "y", "style" : "text-align:center" }, { "id": "col3", "type": "input", "ref": "name" }, { "id": "col4", "type": "combo", "ref": "city", "strJsonNodeSet": "combo_city", "strLabelRef": "label", "strValueRef": "value" }, { "id": "col5", "type": "combo", "ref": "code", "strJsonNodeSet": "combo_code", "strLabelRef": "label", "strValueRef": "value", "style" : "text-align:center" } ]; datagrid1.createColumns(objCol); } function setHideRows(bIsHide) { datagrid1.setRowHidden(2, bIsHide); datagrid1.setRowHidden(4, bIsHide); datagrid1.setRowHidden(6, bIsHide); datagrid1.setRowHidden(8, bIsHide); datagrid1.setRowHidden(10, bIsHide); }; </script> </head> <body onload="__createElements()" class="sbgrid_body"> <div id="button_group"> <input type="button" class="sbgrid_demo_button" style="width:348px;height:30px;" id="button_Hide_Row" value="Rows 숨기기" onclick="setHideRows(true);"></input> <input type="button" class="sbgrid_demo_button" style="width:348px;height:30px;" id="button_Hide_Column" value="Rows 숨김 해제" onclick="setHideRows(false);"></input> </div> <div class="content_group"> <div id="sbGridArea"></div> </div> </body> </html>