madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Documentation doesn't specify which settings can be made through config (not just through code) and how to set them #851

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I don't like writing too much settings code if there is a possibility to set 
from config file.

The doc is not specifying much related to what can be set in config file.

Sample. Now I need to set some basic things as:

        $grid->addFormatterDir('My/Grid/Formatter', 'My_Grid_Formatter');
        $grid->addFiltersRenderDir('My/Grid/Filters/Render/Table/', 'My_Grid_Filters_Render_Table');
        $grid->addFiltersRenderDir('Application/Grid/Filters/Render/Table/', 'Application_Grid_Filters_Render_Table');

        $grid->setEscapeOutput(false);
        $grid->setExport(array('xml', 'csv', 'excel', 'pdf'));
        $grid->setCharEncoding('utf8');

Which one can be set through config file and how?

I suggest to update the docs to bring a bit more details related to config side.

Original issue reported on code.google.com by cbic...@gmail.com on 15 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago
Hi,

Check this file:
http://code.google.com/p/zfdatagrid/source/browse/trunk/application/grids/grid.i
ni

By default, charEncondig is set to UTF-8.

It's possible implement some missing configuration.

Original comment by ivomonte...@gmail.com on 15 Apr 2012 at 8:14

GoogleCodeExporter commented 9 years ago
Check last trunk commit - r1906.

Based in your example:
grid.formatter[] = My_Grid_Formatter

grid.filtersRender[] = My_Grid_Filters_Render_Table
grid.filtersRender[] = Application_Grid_Filters_Render_Table

grid.export[] = xml
grid.export[] = csv
grid.export[] = excel
grid.export[] = pdf

grid.charEncoding = UTF-8

Original comment by ivomonte...@gmail.com on 15 Apr 2012 at 9:57

GoogleCodeExporter commented 9 years ago
Forgot commit main file. Check r1907.

Original comment by ivomonte...@gmail.com on 15 Apr 2012 at 10:09

GoogleCodeExporter commented 9 years ago

Original comment by ivomonte...@gmail.com on 5 May 2012 at 5:11