C#.net MVC5 Partial Views with webgrid table

bglick21

n00b
Joined
Apr 27, 2012
Messages
19
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 }))

))



Controller

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);

}



[ChildActionOnly]

public ActionResult Partial1()

{ …

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





I have tried

@Html.RenderPartial("_SecurePartial1")

@Html.RenderAction("SecurePartial1").

@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?
 
upload_2016-11-23_10-43-8.png
 
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.
 
Back
Top