I have a Default.aspx on which resides a PlaceHolder. I add user controls (ascx) to controls of PlaceHolder. On that user controls, i have RadGrids by which i insert/update/delete records. I popup another aspx from RadGrid to insert/update/delete records. When i insert/update/delete over this popup i use following codes:
on PopUp.aspx:
function
CloseAndRebind(args)
{
GetRadWindow().Close();
GetRadWindow().BrowserWindow.refreshGrid(args); // refreshGrid here refers to codes from which that popup is called(ascx)
}
on usercontrol.ascx:
function
refreshGrid(arg)
{
if(!arg)
{
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else
{
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
on usercontrol.ascx.cs:
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
RadGridHizmetler.MasterTableView.SortExpressions.Clear();
RadGridHizmetler.MasterTableView.GroupByExpressions.Clear();
RadGridHizmetler.Rebind();
}
else if (e.Argument == "RebindAndNavigate")
{
RadGridHizmetler.MasterTableView.SortExpressions.Clear();
RadGridHizmetler.MasterTableView.GroupByExpressions.Clear();
RadGridHizmetler.MasterTableView.CurrentPageIndex = RadGridHizmetler.MasterTableView.PageCount - 1;
RadGridHizmetler.Rebind();
}
}
Popup is closed and (for instance) new record is inserted to the database. That is ok. However when i click nextpage or last page of RadGrid(on ascx that has been added to control of PlaceHolder), RadGrid just disappears. When i click any page number nothing happens and when i click another page number(at the second try) RadGrid disappears again.
How can i resolve this? Thanks...