A more sensible way to do paging in Structures_DataGrid?
| From: | Ken Restivo | Date: | Fri, 26 Nov 2004 03:47:35 +0000 |
| Subject: | A more sensible way to do paging in Structures_DataGrid? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15815@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
OK I was able to get the stable version of Structures_DataGrid (sorry, using CVS version is
impractical with my ISP).
I'm basically using this approach to work with DBDO:
$dg = new Structures_DataGrid(10, $_REQUEST['page']);
while ($user->fetch()){
$ar = $user->toArray();
$rec = new Structures_DataGrid_Record($ar);
$dg->addRecord($rec);
}
$dg->render();
print $rend->getPaging();
Problem is the paging. On a huge dataset, I'm fetching thousands of records, and the
Datagrid_Renderer_HTML_Table seems to want all of them before displaying 10 of them. There has to be
a better way.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBpqdXe8HF+6xeOIcRAvjRAJ9P7b+ruU113XLvdziiXgwAxlKFwgCfQqTY
PMXKDfpKx4eXXfUm3cAWHi8=
=H9tM
-----END PGP SIGNATURE-----