void Store_BeforeClientInit(Observable sender)
{
Store store = this.Store.Primary ?? ControlUtils.FindControl(this, this.StoreID) as Store;
if (store != null)
{
//It doesn't need show mask for store ajax postback
//store.DirectEventConfig.EventMask.ShowMask = false;
if (store.Proxy.Count == 0)
{
if (store.IsAutoLoadUndefined)
{
store.AutoLoad = true;
}
PagingToolbar pBar = null;
if (this.BottomBar.Count > 0 && this.BottomBar[0] is PagingToolbar)
{
pBar = this.BottomBar[0] as PagingToolbar;
}
else if (this.TopBar.Count > 0 && this.TopBar[0] is PagingToolbar)
{
pBar = this.TopBar[0] as PagingToolbar;
}
if (pBar != null)
{
if (store.BaseParams["start"] == null)
{
store.BaseParams.Add(new Parameter("start", "0", ParameterMode.Raw));
}
if (store.BaseParams["limit"] == null)
{
store.BaseParams.Add(new Parameter("limit", pBar.PageSize.ToString(), ParameterMode.Raw));
}
}
}
}
}