ZFDataGrid table width

I am using zfdatagrid to display a table in a Zend application. How do I set the width of the table? I cannot find any settings in grid.ini.

public function displaytemptableAction()
{
    $config = new Zend_Config_Ini(APPLICATION_PATH.'/grids/grid.ini', 'production');

    $db = Zend_Registry::get("db");

    $grid = Bvb_Grid::factory('Table',$config,$id='');
    $grid->setSource(new Bvb_Grid_Source_Zend_Table(new Model_DbTable_TmpTeamRaceResult()));

    //CRUD Configuration
    $form = new Bvb_Grid_Form();
    $form->setAdd(false)->setEdit(true)->setDelete(true);
    $grid->setForm($form);

    $grid->setPagination(0);
    $grid->setExport(array('xml','pdf'));
    $this->view->grid = $grid->deploy();
}

      

zfdatagrid table width

+2


a source to share


2 answers


It seems that the width of the table is controlled via the css file in the "./public/styles" folder

td div input[type='text'] {
    width: 98% !important;
    border: 1px solid #ddd;
}

      



Another nice API with garbage documentation.

+1


a source


Just paste it into your css file like any other element. You can right click on the view source on the generated page and see what classes (if any) are listed in the / tr / td`s table.



0


a source







All Articles