CGridview适合没有滚动的屏幕分辨率

时间:2014-10-30 10:50:56

标签: php css yii cgridview

我正在使用CGridview的可编辑网格扩展。 我的网格:

$this->widget('EditableGrid', array(
    'dataProvider' => $dataProvider,
    'template' => '{items}{pager} ',
    'id' => 'PO-grid',       
    'htmlOptions'=>array(
                //'style'=>'width:1100px;'
             ),
    'columns' => array(   
            array(
            'class' => 'EditableGridColumn',
            'header' => '',
            'name' => 'PO_{gridNum}_{rowNum}_edit',
            'imageurl'=> Yii::app()->request->baseUrl.'/images/update.png',
            'tag' => 'button',
            'tagHtmlOptions' => array(                               
                )
            ),
            array(
            'class' => 'EditableGridColumn',
            'header' => 'StentysRef',
            'name' => '[{gridNum}][{rowNum}]ref',
            'tag' => 'textField',           
            'tagHtmlOptions' => array(                 
                'readonly'=>true              
                )
            ),                                               
                array(
            'class' => 'EditableGridColumn',
            'header' => 'SupplierRef',
            'name' => '[{gridNum}][{rowNum}]productref',
            'tag' => 'textField',
            'tagHtmlOptions' => array(                   
                'readonly'=>true
                )
                ),
                array(
            'class' => 'EditableGridColumn',
            'header' => 'Product',
            'name' => '[{gridNum}][{rowNum}]productname',
            'tag' => 'textField',
            'tagHtmlOptions' => array(
               // 'size' => '2'
                'readonly'=>true
                )
                ),

                array(
            'class' => 'EditableGridColumn',
            'header' => 'Qty',
            'name' => '[{gridNum}][{rowNum}]qty',
            'tag' => 'textField',
            'tagHtmlOptions' => array(
                'size' => '2',
                'readonly'=>true,'width'=>'10px','style'=>'width:70px;'
                )
                ),
                array(
            'class' => 'EditableGridColumn',
            'header' => 'Description',
            'name' => '[{gridNum}][{rowNum}]description',
            'tag' => 'textField',
            'tagHtmlOptions' => array(
               // 'size' => '5'
               'readonly'=>true
                )
                ),            
                array('class'=>'CButtonColumn','template' => '{delete}',
                                'buttons'=>array(
                                    'delete' => array(                                          
                                        'options'=>array('style'=>'margin-left:20px'),
                                        'imageUrl'=>\Yii::app()->request->baseUrl.'/images/delete.png', )
                ),
                ),                                  
    ),
));?>

我的问题是,Gridview适合1600 X 900 px屏幕,它不适合下面的px。 有人请帮我解决这个问题。 我想让这个网格适合屏幕1366 px。

0 个答案:

没有答案