Javascript ExtJS emptyText doesn't show on Ext.grid.Panel -
the empty text in ext 4.2 seems not displaying ext.grid.panel
i can demonstrate using javascript editor here: http://docs.sencha.com/extjs/4.2.2/#!/api/ext.grid.panel
just delete data
config store, , add emptytext
config panel on first example. should this:
ext.create('ext.data.store', { storeid:'simpsonsstore', fields:['name', 'email', 'phone'], //no data here proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } }); ext.create('ext.grid.panel', { title: 'simpsons', emptytext: 'test empty text', //add emptytext store: ext.data.storemanager.lookup('simpsonsstore'), columns: [ { text: 'name', dataindex: 'name' }, { text: 'email', dataindex: 'email', flex: 1 }, { text: 'phone', dataindex: 'phone' } ], height: 200, width: 400, renderto: ext.getbody() });
note text will show up, once click on name
, email
, or phone
- once grid gets sorted.
is ext bug? how can work around emptytext show without having sort panel first?
no it's feature. point not show empty text while grid loading data because not yet known whether there data or not.
the feature not needed when data local though, add following grid config:
viewconfig: { deferemptytext: false }
Comments
Post a Comment