ilhan
ilhan

Reputation: 8945

Paging issue in ExtJS 4.1

I have figure out that when the grid has paging property you should not sent the metaData property second time from the server. Because if you send it second time paging breaks. I only needs to send at first. How should I overcome this problem? The problem comes from this code that I have found it in the documentation.

listeners: { //under the store
            'metachange': function(store,meta){
            grid.reconfigure(store,meta.columns);
            }  

Upvotes: 0

Views: 334

Answers (1)

Izhaki
Izhaki

Reputation: 23586

A proposal:

listeners: { //under the store
    'metachange': function(store,meta){
     if ( !this.meta )
     {
         this.meta = meta;
         grid.reconfigure(store,meta.columns);
     }
}  

Upvotes: 2

Related Questions