What’s next?!
Hi,
There will be a maintenance release by the end of next week. This won’t bring any “new” features. Just some code cleanup, optimization, small improvements and bug fixes.
I’m already planning release 0.7. No release date or much information.
But this is what I’m heading for:
- Comply with Zend Framework Coding Standards
- Pdf optimizations (multi-line support)
- General code improvements with deploy classes
- Deploy
- OpenSearch
- Charts. (google, or other php lib)
- New Data Source – Url Mapper
- Solr
- Lucene
- OpenSearch
- Manual Mapping
- Code cleanup
- “your request….”
This is just the first draft.
Feel free to suggest more and to participate in the project.
Best Regards,
Bento Vilas Boas



altivec Said,
March 28, 2010 @ 11:44
Hi, thanks for the good work !!!
0.6 et great, and 0.7 looks amazing !!!
We’re going to use it much on a project this week, and I will give you some feedback (if necessary !)
Maybe there could be a “Send by email” export, and when modifying, something more easy to handle date and time datas, and why not, for text value, a HTML editor.
Thanks for all,
Aurélien.
Italba Said,
March 29, 2010 @ 08:39
Hi, I am using zfdatagrid in production environment right now, and I am very satisfied with it. I would like to propose some improvements.
1) More documentation and examples.
2) Deployment in a different-than-grid schema, for instance a weekly or monthly calendar, or a geographic map.
3) Phtml template based reporting system.
When I’ll have some time, I would like to develop a “visual” design tool for grids, forms and queries. I hope soon.
Tanks,
Italo A.
dermisek Said,
March 30, 2010 @ 04:41
Hi,
the zfdatagrid is a great library! I would like also thank you for your quick responses on bug entries!
I would propose some features as well:
*) simplifying of interfaces – let’s say Bvb_Grid_Source_SourceInterface would be divided into some sort of ‘readonly’ and ‘CRUD’ interface. that would simplify creation of additional custom source classes. The current interface is too complex for that and not always is CRUD required.
*) fetching only the limited result: if there is paging by 20 the query itself would retrieve only those 20 result and the ‘total amount’ can be retrieved by using ‘mysql_num_rows’. of course only if there is this option (selectable). this approach would avoid fetching 10000 records if only 20 are displayed.
Thanks!
Tomas
dermisek Said,
March 31, 2010 @ 01:12
Hi,
I meant the ‘SQL_CALC_FOUND_ROWS’ and ‘SELECT FOUND_ROWS()’ combination.
t.
Bento Vilas Boas Said,
April 1, 2010 @ 16:06
Hi,
That is a good idea, but I don’t see how to implement it, by the simple fact that SQL_CALC_FOUND_ROWS must be set before columns selection. And I don’t see any method to change columns selection order.
Best Regards,
Bento Vilas Boas
jeremyl Said,
April 2, 2010 @ 07:41
I wanted to share a mod that I made. Use case was that I wanted to be able to filter data from my Zend models (specifically to implement transparent soft deletes).
Firstly, in my model files, I added the following array of conditions under my reference map:
public $_condition = array(“is_deleted” => 0);
Secondly, in Grid\Source\Zend\Table.php, in __construct (around line 55), I added the following code, which adds a “where” clause into Zend Tables, based on the array in the model:
if(isset($this->_model->_condition) && is_array($this->_model->_condition)) {
foreach ( $this->_model->_condition as $field => $value ) {
$select->where($field . ‘=?’, $value);
}
} // end of where section
Lastly, in order to allow the same kind of filtering in crud dropdown fields, I added the following code into Grid\Source\Zend\Select.php, in buildFormElements (around line 796):
// inserted to allow filtering if the model has $_condition
if(isset($t->_condition) && is_array($t->_condition)) {
$db = $t->getAdapter();
$select = $t->select(); //new Zend_Db_Select($db);
$select->from($in['name']);
foreach ( $t->_condition as $field => $value ) {
if ( stripos($field, ‘.’) !== false ) {
$field = substr($field, stripos($field, ‘.’) + 1);
}
$select->where($field . ‘=?’, $value);
}
$r = $t->fetchall($select)->toArray();
} else {
//original condition
$r = $t->fetchAll()->toArray();
}
Sorry about the formatting of the code above! Hope this is useful to somebody.
Italba Said,
April 2, 2010 @ 09:39
Hi, sorry for the OT, I would like to answer a question about zfdatagrid.
I am using it now in that way:
$grid = Bvb_Grid::factory(‘table’, $config, $id);
// All grid definitions follows..
$this->view->grid = $grid->deploy();
I would like to separate the grid definition from controller, like I do for forms.
That is, something like
$grid=new Grid_MyApp_MyGrid();
with all grid customizations in Grids/MyApp/MyGrid.php. How can I do that?
Best Regards and Happy Easter,
italo A.
sqrbrkt Said,
April 4, 2010 @ 23:47
hi Bento
I kind of miss the old way of ordering columns, without the arrows displaying all the time.
I’m looking into how to reinstate this, but I find it difficult to find my way around the code.
So my feature request is adding the option to use “old style” ordering
Cheers! Dan
sqrbrkt Said,
April 5, 2010 @ 00:39
hi again – having posted that last comment I managed to make the update myself!
I’ve edited Bvb_Grid_Deploy_Table but I will create a subclass shortly if anyone is interested.
Cheers! Dan
Bento Vilas Boas Said,
April 5, 2010 @ 14:53
Hi,
Makes sense. I wil add a new option for the people that wants the old style.
thanks
Best Regards,
Bento Vilas Boas
dermisek Said,
April 6, 2010 @ 04:13
Hi Bento,
I found this forum already solving it. Maybe it helps you. If not I would suggest to go with count(*) to make it working on all db, because there is critical amount table size where the ‘select all’ and then using 20 records does not work (try with 10000 items in db with 4 inner joins ….)
http://n4.nabble.com/Adding-SELECT-options-to-Zend-Db-Select-td673667.html
Good luck!
Thanks. Tomas
sqrbrkt Said,
April 7, 2010 @ 01:00
hi again Bento
Another feature I’ve seen in your jquery example but would like to see in other tables is the ability for the user to set the number of records to display.
I’ll try and code this myself anyway, as I’m feeling more confident in my abilities
Cheers
Dan
sqrbrkt Said,
April 9, 2010 @ 16:28
hi Bento, re: my comment above about subclassing.
I’ve made a subclass of Bvb_Grid_Deploy_Table that overwrites the _buildTitlesTable method.
But it doesn’t work as planned.
After investigation I realised it’s because of this in line 1489 of Bvb/Grid/Deploy/Table.php:
$bTitles .= self::_buildTitlesTable(parent::_buildTitles());
self:: calls the parent’s method rather than my subclass’s overwritten method, and I can’t find a way around that. For now I’ve changed Bvb/Grid/Deploy/Table.php line 1489 to:
$bTitles .= $this->_buildTitlesTable(parent::_buildTitles());
but can you think of a way I can get my subclass working while leaving the parent class clean?
Cheers
Dan
Bento Vilas Boas Said,
April 12, 2010 @ 16:07
Hi,
Done. Check the revision 1116 and use
$grid->setAlwaysShowOrderArrows(false);
Best Regards,
Bento Vilas Boas
Bento Vilas Boas Said,
April 12, 2010 @ 16:11
HI sqrbrkt,
I’ve change sell:: to $this
check the latest revision
Best Regards,
Bento Vilas Boas
chh Said,
April 13, 2010 @ 12:55
Hi,
it would be very nice if a setSqlExp can be used foreach hrow
eg.
—hrow1—
id1, name1, value1
id2, name2, value2
…
—, ———-, sum of hrow1
—hrow2—
id3, name3, value3
id4, name4, value4
id5, name5, value5
—, ———-, sum of hrow2
etc…
Thanks for the great project.
Chrstian
sqrbrkt Said,
April 14, 2010 @ 20:04
Thanks Bento – I just saw your other reply about setAlwaysShowOrderArrows too which is very welcome.
I had some trouble trying to add Zend_Form elements to a grid – the form elements didn’t render but displayed their HTML source instead.
I’m using a different approach now but can you tell me if I’m missing something: should we be able to populate a grid with an array of Zend_Form elements?
All the best
Dan
postnuke Said,
April 17, 2010 @ 21:56
I have 2 issues:
1 – In drowpdown filter only orders by value ASC, but if I want order by value DESC or key ASC|DESC ?
2 – I use setPdfGridColumns(‘name’, ‘qty’) and in my grid i have Right Extra Column too. If I print pdf document, Right Extra Column shows too, but i dont want it, i want only print setPdfGridColumns parameters.
3 – Order by one column, but if i want order second column too, like SQL selects (order by surname ASC, name ASC). Only order one column.
Thanks for all GREAT JOB.
Bento Vilas Boas Said,
April 18, 2010 @ 19:39
Hi,
Yes, you should be able to modify form fields.
$form->addElement(‘text’,'bug_status’);
And only then add it to the grid.
$grid->setForm($form);
This should be working right now.
Best Regards,
Bento Vilas Boas
BugSlayer Said,
April 19, 2010 @ 23:46
This grid is awesome. Thanks!
Here’s my list of wants, in order of importance:
1. “records per page” dropdown. Currently the only option is to hard code this but my users want to be able to select the number of records per page. It would be awesome if this were integrated into the pagination process.
2. “busy” animation. The Ajax feature is awesome, but doesn’t feel quite right because there is no indication that anything has happened until the AJAX request completes. Something like AddBusyAnimator($gridclass, $busymarkup) would address the need. $gridclass would be a class that is added to or removed from the grid when the grid is “busy”. $busymarkup would be arbitrary html added at the start of the grid, for the purpose of displaying the indicator. The rest can be handled with CSS.
3. Filter Decorators. Basically, I want to be able to define an arbitrary filter field type. For example, for a calendar, or range of values. I was looking at the code today and this should be trivial to add.
4. Arbitrary filter types. This is basically a continuation of #3. All that is needed is for the filter type to be able to be a class or callback. The callback would accept the query, fields, filters, etc., and would make the appropriate modifications to the query based on the filter inputs.
5. More predefined filters. Related to #3 and #4. Dates and ranges are probably needed almost universally. I also need bitwise and, and bitwise or filters, but I can implement those easily enough if #3 and #4 are in place.
sqrbrkt Said,
May 4, 2010 @ 10:35
Thanks Bento but actually what I was trying to do was insert a form field into the table itself, so that I could have a column of textboxes.
I’ve used another approach now but if there’s a way to make this possible with bvb_grid I’d love to hear about it
All the best
dAN
Bento Vilas Boas Said,
May 11, 2010 @ 17:09
Hi BugSlayer,
Can you please check the latest revision from SVN?
http://code.google.com/p/zfdatagrid/
It’s already has some implementation of custom filters:
Example for numbers: http://zfdatagrid.com/grid/default/site/filters
Example for dates: http://zfdatagrid.com/grid/default/site/date
There is only need for “beautify” with jquery or something else.
Check the examples in Bvb/Grid/Filters/Render/*
Use $this->addFiltersRenderDir(‘Bvb/Grid/Filters/Render’, ‘Bvb_Grid_Filters_Render’);
for custom locations,
Best Regards,
Bento Vilas Boas
agevaled Said,
May 13, 2010 @ 05:28
hi, this is an excelent plugin! tnks!
i have a little problem only with sear field when i write something aprear the follow error “_idgridChangeFilters is not defined” i read it with firebug!
any can help me?
Bento Vilas Boas Said,
May 13, 2010 @ 13:17
HI,
Are you using this code in your html page?
< ?php echo $this->headScript();?>Best Regards,
Bento Vilas Boas
agevaled Said,
May 13, 2010 @ 13:47
Tnks Bento Vilas Boas, with
headScript();?>
i can solve my problem!!!! and now work DataGrid in my proyect!
Tnks a lot!!!
agevaled Said,
May 14, 2010 @ 03:10
sorry i have another question
i have the next code
$grid = Bvb_Grid::factory(‘table’,array(),$id=”);
$grid->setImagesUrl(‘/extras/images/’);
$db = new Zend_Db_Table(‘db_categorias’);
$select = $db->select();
$form = new Bvb_Grid_Form($class=’Zend_Form’, $options =array());
$form->setAdd(true);
$form->setEdit(true);
$form->setDelete(true);
$grid->setForm($form);
$grid->setSource(new Bvb_Grid_Source_Zend_Select($select));
and have the fallow error
Fatal error: Call to a member function buildForm() on a non-object in /home/library/Bvb/Grid/Deploy/Table.php on line 1627
?
Bento Vilas Boas Said,
May 14, 2010 @ 12:26
Hi,
Please set the source before setting the form. Should solve your problem.
$grid->setSource(new Bvb_Grid_Source_Zend_Select($select));
$grid->setForm($form);
Regards,
Bento Vilas Boas
BugSlayer Said,
May 20, 2010 @ 00:40
Wow! It feels like Christmas
I saw #1 on the mass edit sample. #3, #4, and #5 look like they are working great. Thanks!
I was looking over #2 again, and I’m suddenly thinking it would be better (and easier) to implement this via the templates. You can get good “loading” images at http://ajaxload.info/.
Bento Vilas Boas Said,
May 21, 2010 @ 15:55
Hi,
Ajax loading now there…
Check this example: http://zfdatagrid.com/grid/default/site/ajax
To costumize the content change the css class gridLoader.
Best Regards,
Bento Vilas Boas
adm_rem Said,
July 15, 2010 @ 06:03
I like this grid, and I am using it sometimes. Anyway, I think that it needs an easier way to change the design and the way it looks. For example , you can not change the pagination style template (for example, if you want to use digg style pagination). Now all is hardcoded in Bvb/Grid/Deploy/Table.php , in function _pagination . I think now it is hard to customize to the way you want, because you write some html tags directly in core files .
Here is an example:
$pag .= ($i == $actual) ? “ $i ” : ”
$pag = ” ” . $this->__(‘First’) . “ getGridId()}/” . (($actual – 2) * $ppagina) . “\”>” . $this->__(‘Previous’) . “ ” . $pag;
I think it is great if you can customize all html code what is generated, using a phtml template or so, so you can build pagination styles like digg, classic, punbb -style, etc
Now, to make it to look how i want, I had to modify the core files , and i know this is not the right solution.
milorad Said,
December 10, 2010 @ 18:39
Hi,
I was wounder which is the best approach for me to use data from web services using Zend_Soap_Client instead using data from database. ? I am new at this so any help would be great.
Thanks
Bento Vilas Boas Said,
December 10, 2010 @ 18:43
Hi,
You can use the XML as source.
Check the sample project here: http://code.google.com/p/zfdatagrid/ and the feedAction in the siteController.
Or check the online source code for the controller:
http://zfdatagrid.com/grid/default/site/code
Any question, please let me know..
Best Regards,
Bento Vilas Boas