Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
i need output like this

students    totalpoints    newassignemnt    testing   assignment

raj kumar      30/55          10/20               10/15       10/20

but it displays like this


students    totalpoints    newassignemnt  students    totalpoints    testing students    totalpoints    assignment

raj kumar      30/55          10/20             raj kumar      30/55           10/15   raj kumar      30/55     10/20
raj kumar      30/55          10/20             raj kumar      30/55           10/15   raj kumar      30/55     10/20
raj kumar      30/55          10/20             raj kumar      30/55           10/15   raj kumar      30/55     10/20

3 assignments there so i displays 3 rows. but i need to display in a single row.

@{
    List<WebGridColumn> cols = new List<WebGridColumn>();
    foreach (GradeBook.StudentGradeBook x in Model.Student)
    {
        cols.Add(grid.Column(format:@<text><a href="javascript:DisplayModalPopup();">@item.FirstName @item.lastName</a></text>, header: "student"));
        cols.Add(grid.Column(format:@<text>@totptsawd/@totptspbl</text>, header: "Total Points"));
        cols.Add(grid.Column(format:@<text>@item.PointsAwarded/@item.PointsPossible</text>, header: x.AssignmentName));
    }

}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900