C#.net MVC5 Partial Views with webgrid table


Apr 27, 2012
C# .net MVC5 Partial views with Webgrid table.

I have a Webgrid table that has a select a row feature.

When row is selected, another Webgrid needs to appear on the same screen.

Instead the first Webgrid disappears, and the second Webgrid appears on the top.

View with Webgrid:

gridview1.Column(columnName: "", header: "", style: "f9a", format: (item) =>

Html.ActionLink("jobs by SLA", "JobsBySLA", new { DateID = item.Date }))



public ActionResult JobsBySLA()


string DateField = Request["DateID"];

List<Secure> _list1 = _s.get_SLA(Datefield);

View("~/Views/Secure/Index.cshtml", _list1);

return PartialView("~/Views/Shared/Partial1.cshtml", _list);



public ActionResult Partial1()

{ …

return PartialView("~/Views/Shared/Partial1.cshtml", _list);

I have tried



@Html.Action("SecurePartial1", "Secure")
It appears that you only have one webgrid here and are updating the content on the select. Are you trying to create a hierarchical view where there's a child grid opened up below the selected row?
So you want two grids, one always below the other? I might totally be missing what you're doing here and pardon me if this sounds stupid but it seems like you just need two grids, one on top of the other.
No i want them to be independent partial views that give different results, but i can still see them both.