Re: DB_DataObject and Structures_DataGrid integration

From: Date: Wed, 11 Aug 2004 14:11:41 +0000
Subject: Re: DB_DataObject and Structures_DataGrid integration
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32555@lists.php.net to get a copy of this message
The DataGrid maintainer is around. It may take a couple of days, but he will respond. I am not sure how active he is on pear_dev. I have integrated dataobject and datagrid numerous times when building CEP modules. I have also added HTML_QuickForm into the mix. Re-usable DG/DO integration has been on my todo list for a while, but time is a limited resource for me. The main difficulty in using DataGrid with DataObject has to do with the pager. DataGrid determines the number of pages based on the number of records. When working with large database tables you don't want there to be DataGrid records for every record in the database. Once you use LIMIT in DataObject, paging is broken, and sort is pretty worthless. So I have had to run two queries, one to get the number of records and a second to get the records that will be displayed. This doesn't make sense if you have two pages of 50 records each (might as well select them all), but it is necessary if you have a million records in the DB. Another shortcoming of DataGrid (especially when compared to .NET) is the ability to make rows "editable" in the DataGrid. I have hacked this together for my own needs, but it would be nice to see it available in the package. -Jackson

« previous php.pear.dev (#32555) next »