| Mark Wiesemann 2008-02-10, 7:04 pm |
| Hi Ian,
Ian Warner wrote:
> $output = $this->dataGrid->getOutput('HTMLTable', $rendererOptions);
>
> I am outputting this
>
> but my query is how do I assign a class to the main table element to
> style this?
>
> Is it possible or shall I just wrap in a DIV?
>
> Or do I have to use
>
> // // Create a HTML_Table
> // $table = new HTML_Table(array('class' => 'tbl'));
>
> Seems overkill to do this as I already have a table I can style?
Yes, creating your own table object is the best solution here. You'll
then just pass this object to the fill() method of Structures_Datagrid,
e.g. like this:
$table = new HTML_Table(array('class' => 'tbl'));
$this->dataGrid->fill($table, $rendererOptions);
$output = $table->toHtml();
Regards,
Mark
--
http://www.markwiesemann.eu
|