Scenario-
In Parent window : a gridview is there
column1 column2 column3
a b linkbutton1
c d linkbutton2
when clicked on linkbutton a child window popus up. i add something. And then close the child window[no button is made in child window to close..just normal close].
Again i click on linkbutton to check whether what i have added is there or not. but i dont find.
But if i log out completely from the application...again navigate to the parent page...and click on link button i find the thing that i added in child window is there...
--So is it like parent window is not refreshing when child window is closed. How to tackle this ? kindly help .
---------------------------------------------------------------------------------------
Parent page code :
protected void gridShuttleAdmin_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.previous_color=this.style.backgroundColor;this.style.backgroundColor='PaleGreen'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.previous_color;");
Label lbltrip = (Label)e.Row.FindControl("lbltrip");
if (lbltrip != null)
{
Label lblshuttledetailname = (Label)e.Row.FindControl("lblshuttledetailname");
Label lblshuttlefacilityid = (Label)e.Row.FindControl("lblshuttlefacilityid");
Label lblfacilityid = (Label)e.Row.FindControl("lblfacilityid");
LinkButton lbtn = (LinkButton)e.Row.FindControl("lnkviewID");
lbtn.Attributes.Add("onClick", "var sFeatures='dialogHeight: 700px;dialogWidth: 1000px;'; window.showModalDialog('Shuttle_StopDetails.aspx?shuttlefacilityid=" + lblshuttlefacilityid.Text + "&facility=" + lblfacilityid.Text + "&Trip=" + lbltrip.Text + "','',sFeatures);window.document.forms[0].submit();");
}
}
}
--------------------------------child page------------------------------------------------
protected void gridShuttleDetails_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "AddNew")
{
int identityCreated;
TMS.Business.ShuttleStopDetails ObjShuttleStopdetails = new TMS.Business.ShuttleStopDetails();
TMS.API.ShuttleMaster.ShuttleMaster_IN objShuttleRouteManager = (TMS.API.ShuttleMaster.ShuttleMaster_IN)FillObjectFromScreen();
int index = gridShuttleDetails.Rows.Count - 1;
GridViewRow row = gridShuttleDetails.Rows[index];
var Departurtime = ((Label)row.FindControl("lblDeparture")).Text;
var lblFacilityNamecheck = ((Label)row.FindControl("lblFacilityName")).Text;
if (lblFacilityNamecheck != "" && (objShuttleRouteManager.Shuttle_Facility_Name == lblFacilityNamecheck))
{
ScriptManager.RegisterStartupScript(Page, typeof(Page), "", "alert('Please Enter A Different Facility')", true);
}
else
{
identityCreated = ObjShuttleStopdetails.Create(objShuttleRouteManager);
if (identityCreated > 0)
{
ScriptManager.RegisterStartupScript(Page, typeof(Page), "", "alert('" + System.Configuration.ConfigurationSettings.AppSettings["Save_Record"].ToString() + "');", true);
BindShuttleDetails();
UpdatePanel1.Update();
}
}
}
}
I am closing on top right >< of child winow.