sharad bhadalkar

sharad bhadalkar

  • NA
  • 37
  • 3.5k

Table Footer add total of column (Column name TL and NLA)

Nov 30 2019 6:07 AM
<tbody>
@{int srno2 = 0;}
@foreach (College.Core.ViewModels.SGPA.ExamsViewModel _Exams in _subject.GetExams())
{
srno2 += 1;
<tr>
<td>@srno2</td>
<td>@_Exams.ExamType</td>
<td>@_Exams.ObtainedMark</td>
<td>@_Exams.OutOfMarks</td>
@if(@_Exams.TotalLectureConducted == null)
{
<td>0</td>
}
else
{
<td>@_Exams.TotalLectureConducted</td>
}
@if(@_Exams.NoOfLectureAttended == null)
{
<td>0</td>
}
else
{
<td>@_Exams.NoOfLectureAttended</td>
}
@if(@_Exams.AverageAttendance == null)
{
<td>0%</td>
}
else
{
<td>@_Exams.AverageAttendance%</td>
}
</tr>
}
</tbody>
<tfoot>
<tr>
<td colspan="4" align="right">Total</td>
<td>SUM-TotalLectureConducted</td>
<td>SUM-NoOfLectureAttended</td>
<td>(SUM-TL/SUM-NLA)*100</td>
</tr>
</tfoot>

Answers (2)