PDA

View Full Version : Total record of grid without paging



spizzico7
21 Oct 2010, 1:02 AM
Hi,
i must do show the total records number in a grid without paging.
How i must do? :)

Thanks

Condor
21 Oct 2010, 1:12 AM
You mean store.getTotalCount()?

spizzico7
21 Oct 2010, 2:02 AM
You mean store.getTotalCount()?
Exactly i need to show the total Record at the bottom of Grid.

Condor
21 Oct 2010, 4:01 AM
So, attach a 'load' event handler to the store and update an Ext.Toolbar.TextItem in the bbar of the grid with the new value of getTotalCount.

spizzico7
27 Oct 2010, 1:21 AM
Hi,
i have this error when the grid charge the bbar:
Uncaught TypeError: Object [object Object] has no method 'doLayout'

the bbar code is this:


bbar:new Ext.Toolbar.TextItem({
id: 'textitem'
}),

eztam
27 Oct 2010, 1:28 AM
I think bbar has to be a Toolbar and not a Toolbar.Item

This should fix it:


bbar:new Ext.Toolbar({
items: [
new Ext.Toolbar.TextItem({
id: 'textitem'
})
]
}

spizzico7
27 Oct 2010, 1:32 AM
I think bbar has to be a Toolbar and not a Toolbar.Item

This should fix it:


bbar:new Ext.Toolbar({
items: [
new Ext.Toolbar.TextItem({
id: 'textitem'
})
]
}


Thanks!! :D I have fix it with your code!