TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vidhya
NA
324
88.5k
convert column into row in mvc4 razor webgrid
Jul 16 2013 12:06 AM
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 it 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));
}
}
Reply
Answers (
10
)
redirect Gridview
evaluate Arithmatic expression