1
一些在ZF-數據網格
具體table
刪除特定表導出選項我想刪除了數據網格導出選項(「PDF」,「CSV」,「Excel的」,「字」等。)在zend框架的數據網格中。它現在默認每
附加到該項目,我該如何做到這一點?謝謝 。發佈DataGrid的代碼
幫手下面
public function dataGrid($sql){
$this->view->headLink()->appendStylesheet($this->view->baseUrl('grid/styles/styles.css'));
$this->view->setEncoding('ISO-8859-1');
$config = new Zend_Config_Ini(APPLICATION_PATH. '/configs/grid.ini', 'production');
$grid = Bvb_Grid::factory('Table', $config, 'grid');
$grid->setExport(array());
$backendName = Zend_Cache::$standardBackends[0];
$frontendName = Zend_Cache::$standardFrontends[0];
$frontendOptions = array('automatic_serialization'=> true);
$backendOptions = array('auto_refresh_fast_cache'=> true);
$cache = Zend_Cache::factory($frontendName,
$backendName,$frontendOptions,$backendOptions);
$grid->setExport(array('pdf', 'csv','excel','word'));
$grid->addFiltersRenderDir(APPLICATION_PATH.'/views/helpers/Filters/', 'Filters');
$grid->setPaginationInterval(array(100 =>100, 200 => 200, 500 => 500, 1000 => 1000));
$grid->setUseKeyEventsOnFilters(true);
$grid->query($sql);
return $grid;
}
噢,我要補充的是設置導出選項進入
null
特定視圖中的特定選項,並且網格選項位於配置文件中。謝謝 – Crazyrubixfan