RE: [PEAR] Re: Structures
| From: | Ian Warner | Date: | Mon, 02 Apr 2007 09:36:38 +0000 |
| Subject: | RE: [PEAR] Re: Structures | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26974@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Mark Wiesemann [mailto:wiesemann@php.net]
> Sent: 01 April 2007 20:10
> To: pear-general@lists.php.net
> Subject: [PEAR] Re: Structures
>
> Hi Ian,
>
> Ian Warner wrote:
> > I want to override the colour being set within a HTML rendered structure
> > for a certain row only.
> [...]
>
> The answer is the same as last time: Overload the HTMLTable renderer and
> add the behaviour in the overloaded buildRow() method. Check $value in
> the foreach() loop, e.g. "if ($value == 'IN')" and set then the
> attributes for the cell, e.g. like it is done in lines 427ff. for the
> column attributes from the 'columnAttributes' option.
Mark have I asked this question before ? Apologise for that if I have.
However I cant get the buildRow to output anything.
I am using the complex example as a base.
// Create a HTML_Table
$table = new HTML_Table(array('class' => 'tbl'));
// Ask the DataGrid to fill the HTML_Table with data, using
rendering options
$result = $datagrid->fill($table);
// Doesn't work with either as Method not defined.
//print_r($table->buildRow());
print_r($datagrid->buildRow());
$return['string'] .= '<div id="statsRender">';
// Display the filters
$return['string'] .= self::getFilters($options['fields']);
// Set the pager options
$pagerOptions = array('pagerOptions' => array(
'urlVar' => 'page', 'path' => '',
'clearIfVoid' => false,
'append' => false, 'fileName' =>
'javascript:getAjax(\'statsRender\', \'' . $ajaxPath .
'/page/%d/' .
$pathExtra . '\');')
);
$return['string'] .= '<table
class="tbl"><tr><th>';
$return['string'] .=
$datagrid->getOutput(DATAGRID_RENDER_PAGER, $pagerOptions);
$return['string'] .= '</th></tr></table>';
// Return the created HTML string to the caller.
$return['string'] .= $table->toHTML();
$return['string'] .= '</div>';
Any help appreciated thanks.
>
> HTH and regards,
> Mark
>
> --
> http://www.markwiesemann.eu
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php