摘要:
可以用以下三种方法1.在view里面1<span style="color:#000000;">$provider=$model->search();2$provider->pagination->pageSize=20;3$this->widget('zii.widgets.grid.CGridView',array(4'id'=>'link-grid',5'dataProvider'=>$provider,</span>2.在model的searc 阅读全文
摘要:
'columns'=>array( array( 'class'=>'CCheckBoxColumn', //'header'=>'全选', //'value'=>'$data->id', //'checked'=>'true', 'htmlOptions'=>array( 'width'=>'30', 'style'=>'te 阅读全文
摘要:
model里:01publicfunctionitem($items,$name){02$returnValue='';03foreach($itemsas$n=>$item){04if(isset($this->$name)){05if($n==$this->$name){06$returnValue=$item;07}08}09}10return$returnValue;11}view里:1array('name'=>'isPass','value'=>'$data->item(ar 阅读全文