Datagrid rendering - XML and XLS export
| From: | (PHPDiscuss - PHP Newsgroups and mailing lists) | Date: | Mon, 21 Feb 2005 09:28:10 +0000 |
| Subject: | Datagrid rendering - XML and XLS export | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17590@lists.php.net to get a copy of this message | ||
Hi,
I've got problems rendering datas from the datagrid in XML and XLS.
In both methods, i render *ALL* the HTML page (including datagrid) and i
don't understand why.
Here is my code :
//some require for html view and routines
// DataGrid avec une limite de x records, paramètre du constructeur
if ($rendu == "xls"){
$dg =& new Structures_DataGrid(null, null, DATAGRID_RENDER_XLS);
$dg->renderer->setFilename('nl_' . $module . '_' . $action .
'.xls');
}elseif ($rendu == "xml"){
$dg =& new Structures_DataGrid(null, null, DATAGRID_RENDER_XML);
}
else $dg =& new Structures_DataGrid(15);
//liaison avec le DO
$dg->bind($oCon_User);
//tri
$dg->sortRecordSet($orderBy, $dir);
//... addColumn then render
Thx !
JP Dumont