vidhya

vidhya

  • NA
  • 324
  • 88.5k

convert table into webgrid

Jul 15 2013 2:03 AM
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>

Answers (27)