| Students | Total points | @x.AssignmentName |
|---|---|---|
| @x.FirstName @x.LastName | @totptsawd/@totptspbl | @x.PointsAwarded /@x.PointsPossible |
Convert table into webgrid
how do i convert this table into webgrid

Iftikar HussainRank #423 · 5.9K reputationPosted Jul 14, 2013, 10:56 PM EDT
Could please share the output (application output) of this table?
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 12:11 AM EDT
raj kumar 30/55 10/20 10/15 10/20
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 12:26 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 12:37 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 12:39 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 1:02 AM EDT
List
foreach (GradeBook.StudentGradeBook x in Model.Student)
{
cols.Add(grid.Column(x.FirstName, header: "student"));
cols.Add(grid.Column(totptsawd,header:"Total Points");
}
}
How do i concatenate the 2 string as x.firstname x.lastname for column student.
i need to use local variable forcolumn total points.
i cant use like this cols.Add(grid.Column(totptsawd,header:"Total Points");
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 1:09 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 1:28 AM EDT
It shows error like this
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 1:31 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 1:40 AM EDT
Parser Error Message: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.
cols.Add(grid.Column(totptsawd,header:"Total Points");
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 1:45 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 1:52 AM EDT
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 1:59 AM EDT
cols.Add(grid.Column(format:@
but i need
cols.Add(grid.Column(format:@
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 2:00 AM EDT
cols.Add(grid.Column(format:@
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 2:05 AM EDT
cols.Add(grid.Column(format:@
but i need the output as
10/20
so i used like this
cols.Add(grid.Column(format:@
but i get the output as
10+"/"+20
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 2:10 AM EDT
cols.Add(grid.Column(format:@
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 2:21 AM EDT
when i add this code
i get error
Compiler Error Message: CS1026: ) expected
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 2:32 AM EDT
instead of column i need to add as row.
how to do this?
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 2:33 AM EDT
cols.Add(grid.Column(format:@
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 2:43 AM EDT
Instead of column @item.PointsAwarded/@item.PointsPossible i need to display in row.
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.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 2:59 AM EDT
Regards.
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 3:15 AM EDT
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 3:15 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 3:21 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 3:33 AM EDT
if the student does not have corresponding assignment leave as blank otherwise display the value for particular student.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 15, 2013, 3:37 AM EDT
Regards,
Iftikar
vidhyaRank #4,868 · 321 reputationPosted Jul 15, 2013, 3:42 AM EDT