Aug 08, 2011, 2:05 PM
GridPanel Pagination Issue
Hi,
I'm facing some issues with Gridpanel pagetoolbar. Paging appears but no effect with GridPanel.
I'm loading the store at client side using below code.
I'm creating the GridPanel Dynamically with an empty datastore using directMethods and assiging PagingToolbar into this.
When my page loads, the Page toolbar appears but it has not populated as per my store.
I'm facing some issues with Gridpanel pagetoolbar. Paging appears but no effect with GridPanel.
I'm loading the store at client side using below code.
var gridStore = new Ext.data.JsonStore({
idProperty: idProperty,
root: 'Records',
fields: fieldNames,
pageSize: 10
});
gridStore.loadData(dataset);
gridColumnModel = new Ext.grid.ColumnModel(columns);
datasetGrid.reconfigure(gridStore, gridColumnModel);
datasetGrid.syncSize();
I'm creating the GridPanel Dynamically with an empty datastore using directMethods and assiging PagingToolbar into this.
When my page loads, the Page toolbar appears but it has not populated as per my store.
GridPanel gridDataset = new GridPanel();
gridDataset.ID = "grid";
Store gridStore = new Store();
gridStore.ID = "emptyStore";
JsonReader gridStoreReader = new JsonReader();
gridStoreReader.Root = "Records";
gridStoreReader.IDProperty = "idProperty";
RecordField fieldNames = new RecordField();
fieldNames.Name = "fieldNames";
fieldNames.Mapping = "DisplayName";
gridStoreReader.Fields.Add(fieldNames);
gridStore.Reader.Add(gridStoreReader);
gridDataset.Store.Add(gridStore);
PagingToolbar pageBar = new PagingToolbar();
pageBar.DisplayInfo = true;
pageBar.EmptyMsg = "No dataset values";
pageBar.DisplayMsg = "Displaying Values {0} - {1} of {2}";
pageBar.ID = "gridPage";
pageBar.StoreID = gridStore.ClientID;
pageBar.PageSize = 10;
gridDataset.BottomBar.Add(pageBar);
Could anyone help me on this?
Last edited by anulall; Aug 09, 2011 at 5:09 AM.