当我使用 'htmlOptions'=>array('class'=>'table-bordered table-condensed') 时,自定义类被添加到包装 div 而不是 table 元素
<div id="contact-grid" class="table-bordered table-condensed">
<div class="summary">Displaying 1-6 of 6 results.</div>
<table class="items table">
<thead>
<tr>
谢谢!
更新: 作为最终结果,我需要以下内容:
<div id="contact-grid">
<div class="summary">Displaying 1-6 of 6 results.</div>
<table class="items table table-bordered table-condensed">
<thead>
<tr>
回答:
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'id'=>'contact-grid',
...
'itemsCssClass'=>'table-bordered table-condensed',