convert table into webgrid
how do i convert this table into webgrid
<table>
<thead>
<tr>
<th>Students</th>
<th>Total points</th>
@foreach (GradeBook.StudentGradeBook x in Model.Student)
{
<th>@x.AssignmentName</th>
ptsawd = (int)@x.PointsAwarded.GetValueOrDefault();
ptspbl = (int)@x.PointsPossible;
totptsawd = totptsawd + ptsawd;
totptspbl = totptspbl + ptspbl;
}
</tr>
</thead>
<tbody>
<tr>
@foreach (GradeBook.StudentGradeBook x in Model.Student)
{
<td><a href="javascript:DisplayModalPopup();">@x.FirstName @x.LastName</a></td>
break;
}
<td>@totptsawd/@totptspbl</td>
@foreach (GradeBook.StudentGradeBook x in Model.Student)
{
<td>@x.PointsAwarded /@x.PointsPossible </td>
}
</tr>
</tbody>
</table>