Re: Re: Changing options when rendering twice datagrid
| From: | Michel D'HOOGE | Date: | Tue, 13 Jun 2006 12:02:34 +0000 |
| Subject: | Re: Re: Changing options when rendering twice datagrid | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24342@lists.php.net to get a copy of this message | ||
Olivier Guilyardi wrote:
> Why shouldn't it work ?
In DataGrid::render(), there is:
$this->_renderer->isBuilt() || $this->build();
$test = $this->_renderer->render();
So, in the case (at least) of the HTMLTable renderer, the options are only
taken into account during the build. So when DG::render() is called for the
second time, build should not be called. And thus, we should have twice the
same output (besides odd and even rows which are updated in flatten()).
> _saveRenderer() and _restoreRenderer() are not used in Mark's example
> because the $type argument of render() is null.
Wrong. _restoreRenderer is always called (and this is even you that
cvs-committed that part ;-)
--
Michel