Jqgrid,启用垂直滚动时附加白色space

Jqgrid, additional white space when vertical scrolling is enabled

我的网格有问题,在加载数据并启用垂直滚动后,我发现我的网格在我的行之后加载了额外的 space。我想删除它,知道为什么我得到这个吗?

这是我的带滚动条的网格

这就是问题所在

我只想让滚动条停在第 20 个位置,我不想要那么多 space。

这是我的网格设置:

$html .=        '$("#'. $this->_name .'").jqGrid({';
        $html .=            'url:"tools/grid_server_calls.php",';
        $html .=            'datatype: "json",';
        $html .=            'autoencode: true,';
        $html .=            'mtype: "POST",';
        $html .=            'postData:{inputs:'. $this->_server_inputs .'},';
        $html .=            'gridview: true,';
        $html .=            'ignoreCase: true,';
        //$html .=          'loadui: "block",';

        $html .=            'hidegrid: false,';

        $html .=            'width: "' . $this->_width_grid . 'px",';
        $html .=            'forceFit: true,';
        $html .=            'pager: "#pager_'.$this->_name.'",';
        $html .=            'rowNum: ' . $this->_rowNum . ',';
        $html .=            'rowList: [' . $this->_rowList . '],';

        if( $this->_scroll_enabled ){
                $html .=            'scroll: true,';
                $html .=            'height: "230px",';
        }
        else{
            $html .=            'height: "auto",';
        }

        $html .=            'viewrecords: true,';
        $html .=            'emptyrecords:"'.$this->_message_no_records.'",';
        $html .=            'recordtext:"{0} - {1} / {2}",';
        $html .=            'altRows: true,';
        $html .=            'multiselect: "' . $this->_multiselect .'",';
        $html .=            'altclass: "color_line_grid",';
        $html .=            'caption: "' . $this->_caption . '",';
        $html .=            'colNames: [' . $this->_colNames . '],';
        $html .=            'colModel: [' . $this->_colModel . '],';
        $html .=            'sortname: "' . $this->_initialSort . '",';
        $html .=            'sortorder: "asc",';

        if(!$this->_search_enabled){
            $html .=            'pgbuttons: false,';
            $html .=            'pgtext: null,';
            $html .=            'rowList: [],';
            $html .=            'cmTemplate: {sortable:false},';
        }

我已经找到问题的根源了,简单到先学会看书再问傻问题,其实你不需要设置scroll为true,只需要设置一个高度,当数据超过设置的高度,滚动条会自动出现 'In my case' .