'pjax' => true,
'dataProvider' => $objDataProvider,
'filterModel' => $objSearchModel ,
'反應式'=> true,
'停留'=> true,
Header' => false,
'列' => [
[
## 'label' => '編號', 'hAlign'=> GridView::ALIGN_CENTER,## #
'attribute' => 'agent_id', 'label' => '代理編號', 'hView ['屬性' => '代理', ' '值' => function($objModel) {# return $objModel->agent->screen_name;# }, 'hAlign'=> GridView::ALIGN_CENTER, ],
## /*
$newarray = $columns;
foreach($columns as $key => $vo){
if($vo['attribute']==99999){
unset($newarray [$key]);
}
#}
print_r($newarray);//這個就是移除了999992的新的新的新來數組
在搜尋資料庫的時候就排除,這樣比較好處理。模版的話,<?php if($id !=9999)?>