PDA

View Full Version : Easy problem . Grid Store Pagination



jamesjara
6 Apr 2010, 4:44 AM
hI.. well my english is not very good, i think this i called lazy or nested.. I want all elements in one..
Gridpanel <-cm <- paginator <- Store etc
I DONT WANT THIS
var store = ...
var paginator = ..
var grid (store , paginator )

I WANT/I HAVE this



var $grid_id_hash = new Ext.grid.GridPanel({
width: 600,
height: 330 ,
layout : 'fit',
plugins: new Ext.ux.grid.RowEditor ...............
cm: new Ext.grid.ColumnModel ......

here the problem
bbar: new Ext.PagingToolbar({
...
store: this.store , <- the store is undefinided , HOW CAN I FIX THIS?
...
}),
store: new Ext.data.Store .....
});

Animal
6 Apr 2010, 4:52 AM
This is just javascript. You are going to have to hold a reference to the Store because it needs to be referenced in two config objects. No way round it.

Condor
6 Apr 2010, 5:39 AM
You could create a GridPagingToolbar that gets the reference to the store from it's parent grid.