protected void Page_LoadComplete(object sender, EventArgs e)
{
GridPanel grid = this.ParentComponent as GridPanel;
if (!RequestManager.IsAjaxRequest && grid != null)
{
PagingToolbar pBar = null;
if (grid.BottomBar.Count > 0 && grid.BottomBar[0] is PagingToolbar)
{
pBar = grid.BottomBar[0] as PagingToolbar;
}
else if (grid.TopBar.Count > 0 && grid.TopBar[0] is PagingToolbar)
{
pBar = grid.TopBar[0] as PagingToolbar;
}
if ((grid.StoreID.IsNotEmpty() || grid.Store.Primary != null) && pBar != null)
{
Store store = grid.Store.Primary ?? (ControlUtils.FindControl(this, grid.StoreID) as Store);
if (store != null && store.Proxy.Count != 0 && store.RemotePaging && this.ViewState["Local"] == null)
{
this.Local = false;
}
}
}
}