AshishJoshi-asj / zfdatagrid

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

predefine filters #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
how to set default filters which will apply if no filter was submited via URL 
request ?

I am looking for something like:

$grid->addDefaultFilter('CountryCode', "='AGO'")

The same should exist for sort order.

Original issue reported on code.google.com by martin.m...@gmail.com on 7 Jan 2010 at 2:42

GoogleCodeExporter commented 9 years ago
Hi Martin,

The default order can be set in the query.

The default filters will be implemented.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 9 Jan 2010 at 3:56

GoogleCodeExporter commented 9 years ago
Hi Martin,

From revision 319:

New Method. SetDefaultFilters()
Accepts an array with the following structure

$grid->setDefaultFilters(array('ID'=>'12','IsBig'=>'=1'));

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 10 Jan 2010 at 3:32

GoogleCodeExporter commented 9 years ago

Original comment by martin.m...@gmail.com on 10 Jan 2010 at 5:27

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56

GoogleCodeExporter commented 9 years ago
Is it possible

Original comment by mchougrani@gmail.com on 26 Jun 2010 at 9:13

GoogleCodeExporter commented 9 years ago
HI,

Yes:

$grid->setDefaultFiltersValues(array('field'=>'value','field2'=>'value2'));

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 26 Jun 2010 at 9:36