join p1 in db.PatientComplaints on p.PatientId equals p1.PatientId
join p2 in db.PDoctorSelections on p.PatientId equals p2.PatientId
}
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