That code is extremely confused.
You create an
HtmlTableRow
(a
<tr>
) and an
HtmlTableCell
(a
td
), and then set the inner HTML of the
<td>
to a
<tr>
containing other
<td>
s. That will, of course, generate malformed HTML:
<tr>
<td>
<tr class="odd gradeA">
<td contenteditable="true">...</td>
<td contenteditable="true">...</td>
<td contenteditable="true">...</td>
<td contenteditable="true">...</td>
</tr>
</td>
</tr>
You are also reusing the same
HtmlTableCell
instance for each iteration of your loops. That won't do what you expect - only the data from the last iteration will be shown.
You need to fix your code to generate valid HTML. If it still doesn't work, then you need to explain precisely what you are trying to do, and what the problem is.