Here s my current view code:
<% Html.Grid((List<ColumnDefinition>)ViewData["Parameters"])
.Columns(column =>
{
column.For(c => c.ID);
column.For(c => c.Name);
}).Render();
%>
I d like to attach an HTML "id" attribute to each "name" td tag as such:
<table class="grid">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr class="gridrow">
<td>1</td>
<td id="parameter_1">Address</td>
</tr>
<tr class="gridrow_alternate">
<td>2</td>
<td id="parameter_2">Phone Number</td>
</tr>
</tbody>
</table>
My question:
How do I do this?
I considered the Attributes extension method, but I wasn t sure how I could make it work.