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
Sasi Reddy
NA
346
226.7k
webgrid with Tuple
Mar 27 2014 1:44 AM
This is my Controller
public ActionResult PatientEnquiries()
{
var k = from p in db.MPatientRegistrations
join p1 in db.PatientComplaints on p.PatientId equals p1.PatientId
join p2 in db.PDoctorSelections on p.PatientId equals p2.PatientId
select new
{
name = p.Name,
Age = p.Age,
MobileNo=p.MobileNo,
complaint=p1.Complaint,
Request=p1.Request,
Id=p2.DoctorId
};
return View(k.ToList());
}
This is my view
@{
Layout = "../Shared/_DoctorRegistration.cshtml";
}
<div class="mainbar1" style="height :500px;width:auto; overflow: auto;" align="center">
@{
var grid = new WebGrid(Model, canPage: true, rowsPerPage:3,
selectionFieldName: "selectedRow",ajaxUpdateContainerId: "gridContent");
grid.Pager(WebGridPagerModes.NextPrevious);}
<div class="webGrid">
@grid.GetHtml(tableStyle: "webGrid",
headerStyle: "header",
alternatingRowStyle: "alt",
selectedRowStyle: "selectedrow",
columns: grid.Columns(
grid.Column("Name","Name"),
grid.Column("Age","Age"),
grid.Column("MobileNo","MobileNo"),
grid.Column("complaint","complaint"),
grid.Column("Request","Request"),
grid.Column("Id","Id")
))
</div >
</div>
I got the answer by using above code
Reply
Answers (
0
)
In Crystal Report Windows Data Source Binding problem
chapture image coding