Tuesday, November 11, 2008

Master (GridView) Detail (FormView) refresh after update

Master Detail automatic GridView/FormView refresh after an update.

The secret to having a master (GridView) trigger a detail (FormView) and see it refresh after an update.

Just add the DataBind in Page_PreRenderComplete handler.

protected void Page_PreRenderComplete(object sender, EventArgs e)
{
GridView1.DataBind();
FormView1.DataBind();
}

Additional information:
Master-Detail with the GridView, DetailsView and ModalPopup Controls

GridView control to show master-child or master-slave data, written in c#, asp.net, and javascript.
Subject: Display data using gridview, by generating hidden div with child data. Javascript used to show and hide (collapse and expand) grid.

More...GridView control to show master-child or master-slave data, written in c#, asp.net, and javascript.

ASP.Net Feeds