I would like to make a simple adapter for the Gridview control that would render the cell contents inside a <div> tag.
Instead of rendering as
<table>
<tr>
<td>Some Data</td>
<td>Some Data</td>
</tr>
</table>
I would like it to render as
<table>
<tr>
<td><div>Some Data</div></td>
<td><div>Some Data</div></td>
</tr>
</table>
I understand this can be done other ways using Jquery or in RowDataBound, but I specifically would like to do it with an adapter.
I seems to me the change would be simple if there was a way to see the code for an adapter that creates the default .Net Gridview, however I do not know how to obtain that code.
Any help is greatly appreciated.
Microsoft provides a reference implementation of Control adapters in form of the CSS Friendly Control Adapters
You can take a look at how they have implemented the GridViewAdapter
Here is the bit of the code that deals with rendering the rows