View Full Version : if no data in Ext.data.Store

22 Jul 2010, 5:14 AM
HI all

I am trying to build a grid and defined data store for grid.
There are several cases where this data store will be empty.

How can i specify some default message if there is no data in data store? so i don't get any java script error

my store:
data: arydata is dynamic JSP array.

var store = new Ext.data.Store({
reader: reader,
autoLoad: true,
data: arydata,
sortInfo:{field: 'document_name', direction: "ASC"}


22 Jul 2010, 5:34 AM
In the grid:

viewConfig: {
deferEmptyText: false, // <- because your store is already loaded
emptyText: 'No records'

22 Jul 2010, 5:47 AM
fantastic! thanks