Re: Question about Pager and DB_DataObject
| From: | Olivier Guilyardi | Date: | Sat, 27 May 2006 11:33:00 +0000 |
| Subject: | Re: Question about Pager and DB_DataObject | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24177@lists.php.net to get a copy of this message | ||
Hi,
Jose Manuel Zea wrote:
Thank you, Justin and Olivier. Very interesting tutorial, clear and well styled.Glad you like it.
Only one question, following a previous email called, "ajaxing pager links", I transformed the pager options to 'ajax' the links, this is what I did: if ($this->ajax){ $params['append'] = false; $params['path'] = ''; $params['fileName'] = 'javascript:getPage(%d,\''.$url.'\')'; }Yes, in Structures_DataGrid 0.6.3 you can pass any Pager options as the 6th argument of getPaging(). $renderer =& $datagrid->getRenderer(); echo $renderer->getPaging('Sliding', '|', '<<', '>>', 5, $params); Or, with the current CVS version, you can use fill() : $pager =& Pager::factory($params); $datagrid->fill($pager); echo $pager->links; -- og// Obtener la lista de resultados paginada$result = $this->Pager_Wrapper_DBDO($params); Can I do something similar with Structures_DataGrid?