Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
似乎 CGridView 中的默认行为是,当有人单击该行时,它会将“选定”类添加到该行。我该如何摆脱它?单击该行时,我不希望发生任何事情。
您必须将$selectableRows属性设置为0:
$selectableRows
0
<?php $this->widget('zii.widgets.grid.CGridView', array( 'selectableRows' => 0, /*the rest of your initialization properties*/ )); ?>
你可以在 Yii 类参考中看到它。