Home » Structures » Structures_DataGrid_Renderer_HTMLTable » Bug #8180
adding rows to HTML Table Renderer output
Details
| Request #8180 | adding rows to HTML Table Renderer output |
|---|---|
| Submitted | 2006-07-11 10:28 UTC |
| From | bennythebee at gmail dot com |
| Assigned | wiesemann |
| Status | Wont fix |
| Package | Structures_DataGrid_Renderer_HTMLTable |
| PHP Version | 5.1.4 |
| OS | Debian Sarge |
| Roadmaps | (Not assigned) |
Comments
[2006-07-11 10:28 UTC] bennythebee at gmail dot com
Description:
------------
I would like to be able to add a row below each table row output by the Structures_DataGrid HTML_Table renderer.
I tried doing a
global $table;
$table->addRow(array("foo"),array("colspan" => 3));
in the column formatter of the row's last column, but this will result in all the table rows being added on top of the output.
Can this be done somehow?
Thank you!
[2006-07-11 15:22 UTC] bennythebee at gmail dot com
Hi,
thank you for the hint. I was able to add the rows like this, using a hackish concept:
foreach($table->_tbody->_structure as $rownum => $content) {
$row = array_shift($table->_tbody->_structure);
$temparray[] = $row;
$temparray[] = array(0 => array("contents" => "bar","type" => "TD","attr" => array("colspan" => 5)));
}
$table->_tbody->_structure = $na;
$table->toHtml();
...but this doesn't help me a lot, because I have no way to set the ID of the inserted row's div to a value which has to come from the dataset (unique value).
I want to do an ajax call with that value (ignore the above code...it's just meant as an example).
Is it possible to set row attribs through Structures_DataGrid to some value from the Dataset? I would be able to access the DOM for that value then.
Or, any other ideas?
Thank you!
Benny