0
看起来像CGridView中的默认行为是,当有人单击行时,它会将“selected”类添加到该行。我该如何摆脱?点击该行时,我不希望发生任何事情。yii在单击行时禁用CGridView中的onclick行为
看起来像CGridView中的默认行为是,当有人单击行时,它会将“selected”类添加到该行。我该如何摆脱?点击该行时,我不希望发生任何事情。yii在单击行时禁用CGridView中的onclick行为
你必须在$selectableRows
属性设置为0
:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'selectableRows' => 0,
/*the rest of your initialization properties*/
)); ?>
谢谢!一直在寻找这个! – keeg 2012-04-15 16:55:24
不客气,@keeg :) – 2012-04-15 17:10:00