Structures_DataGrid with Smarty and Pager

From: Date: Fri, 27 Jul 2007 19:27:12 +0000
Subject: Structures_DataGrid with Smarty and Pager
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27746@lists.php.net to get a copy of this message
I am attempting to use the Structures_DataGrid PEAR package with Smarty to have the data paged. I am using the Array DataSource and whilst I have got the table showing up fine, the data is never paged. There are 400 items in the array but the output always says page 1 of 1. The code is taken directly from the manual for the most part: // Build data grid require_once('Structures/DataGrid.php'); $datagrid =& new Structures_DataGrid(); // ... various $datagrid->addColumn calls ... $datagrid->bind($users); $datagrid->fill($smarty, array('convertEntities' => false)); $smarty->caching = false; // Don't want to cache this page $smarty->display('list.tpl'); And in list.tpl I have the code copied directly from the manual e.g. {getPaging prevImg="<<" nextImg=">>" separator=" | " delta="5"} and so on. This is the using the latest stable version of all the appropriate Structures_* packages, Pager and PHP 5.2.3. Why isn't it paging the data? -- View this message in context: http://www.nabble.com/Structures_DataGrid-with-Smarty-and-Pager-tf4159753.html#a11835351 Sent from the Pear - General mailing list archive at Nabble.com.

« previous php.pear.general (#27746) next »