Rite now i am using two tabs one for countries and one for cities.IF i click first tab, countries will be loaded and second tab, cities will be loaded.Now what i want to achieve is when i click any of countries coming under the grid of first tab,then second tab is filled with corresponding countries cities only ,how will i do that,, country id and city c_id has Primary key and foreign key relation ship
<ul>
<li><a href="#tabs-1">Tab Header 1</a></li>
<li>@Html.ActionLink("Tab Header 2", "_gridsecondtab")</li>
</ul>
<div id="tabs-1">
@Html.Action("_gridfirsttab");
</div>
firstgrid
<div id="gridfirstContent">
@grid.GetHtml(tableStyle: "webGrid",
headerStyle: "header",
alternatingRowStyle: "alt",
selectedRowStyle: "select",
columns: grid.Columns(
grid.Column("id", format: (item) => item.GetSelectLink(item.id.ToString())),
grid.Column("countryname", "CountryName"),
grid.Column("continent", "Continent", style: "description"),
grid.Column("language", "Language")
))
@{
firstmvc4.Models.Country conuntry = new firstmvc4.Models.Country();
}
Controller
public ActionResult _gridfirsttab()
{
return PartialView(db.Countries.ToList());
}
public ActionResult _gridsecondtab()
{
return PartialView(db.Citynews.ToList());
}