after 2 LKG row i need a row there is first column TOTAL and the boys down i need a total boys count and girls column down there TOTAL girls count next Grand Total
how to set like that
like that i want all diffrnt classes
<table class="table table-bordered">
<thead>
<tr>
<th>Class</th>
<th>Division</th>
<th>Boys</th>
<th>Girls</th>
<th>Total</th>
</tr>
</thead>
@foreach (var divcls in dc)
{
var students = Model.Where(S => ((S.Stud_Status.FirstOrDefault(A => A.AcademicYearId == SessionValues.Current.AcademicYear.AcademicYearId) ?? new Stud_Status()).Sett_DivisionsInClasses ?? new Sett_DivisionsInClasses()).DivInClassId == divcls.DivInClassId).ToList();
var Btotal = students.Count(b => b.Gender == "M");
var Ftotal = students.Count(f => f.Gender == "F");
var Total = students.Count;
<tr>
<td>@divcls.Sett_Classes.ClassName</td>
<td>@divcls.Sett_DivistionMaster.DivName</td>
<td>@Btotal.</td>
<td>@Ftotal</td>
<td>@Total</td>
</tr>
}
</table>
</div>