[eluser]axle_foley00[/eluser]
shiggins:
I'm not quite sure why it's only happening to the first row for you. I did however notice that it seems when you specify a style on a table cell/row, the table that is generated alternates the style for every other row by default. So in other words you will end up with something like this being generated:
Code:
<table border="0" width="100%" cellpadding="2" cellspacing="0" align="left">
<tr>
<th class="tblhead">Name</th>
<th class="tblhead">Color</th>
<th class="tblhead">Size</th>
</tr>
<tr>
<td class="tblcell">Fred</td>
<td class="tblcell">Blue</td>
<td class="tblcell">Small</td></tr>
<tr>
<td>Mary</td>
<td>Red</td>
<td>Large</td>
</tr>
<tr>
<td class="tblcell">John</td>
<td class="tblcell">Green</td>
<td class="tblcell">Medium</td>
</tr>
</table>
Is this what is happening to you? Could you show us an example of your controller code?
Edit:
I'm thinking that you may want to specifiy some additional template configurations, so that the alternate rows have the same styles as the others. So your template config would look like this instead:
Code:
$tmpl = array (
'table_open' => '<table border="0" width="100%" cellpadding="2" cellspacing="0" align="left">',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th class="tblhead">',
'heading_cell_end' => '</th>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td class="tblcell">',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td class="tblcell">',
'cell_alt_end' => '</td>',
);
Notice the last 4 configuration items are similar to the 4 items just above it. I don't think it should be necessary to use those last 4 items unless you actually want the rows to alternate. But it might help in your case.
Does anyone else notice that it automatically alternates the rows?
UPDATE: Actually I just looked through the HTML Table Class Library and it has a default template config. So just in case you don't set a particular template config item, it will use the one from the default template. Perhaps that could be why you are having this problem.