Hi,
following is a working code that displays record in view using datacolumn and datarow
<table>
<thead>
<tr>
@foreach (DataColumn col in Model.Columns)
{
<th>@col.ColumnName</th>
}
</tr>
</thead>
<tbody>
@foreach (DataRow row in Model.Rows)
{
<tr>
@foreach (DataColumn col in Model.Columns)
{
<td>@row[col.ColumnName]</td>
}
<td> @Html.ActionLink("Edit", "Edit") |</td>
</tr>
}
</tbody>
</table>
my problem is i can't add an in edit field.in this example first column of every row contains id .
i want to add id to edit field like this
<td> @Html.ActionLink("Edit", "Edit"), new { id=col[0] } |</td> i tried it several times ,yet to succeed.
Regards
Baiju