PDA

View Full Version : loading dialogue while data loads in grid.



coooolmagic
22 Jul 2010, 5:49 AM
hi all

i am trying to use Loading dialogue used in this post.

http://www.sencha.com/deploy/dev/examples/form/xml-form.html

some how i can't link the idea.

pleas help.

here is my store. i am using a java array with data.

data is already available even before data is loaded in grid....

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

});

Condor
22 Jul 2010, 6:00 AM
Why would you want a loadMask if your data is already loaded?

dduffy
22 Jul 2010, 8:10 AM
var xloadmask = {msg:"Please wait while loading", store: store };
var store = new Ext.data.Store({
reader: reader,
autoLoad: true,
data: arydata,
sortInfo:{field: 'document_name', direction: "ASC"},
loadmask: xloadmask
});

Condor
22 Jul 2010, 9:28 AM
You don't need to create a loadmask. The grid will do that for you when you configure it with loadMask:true.
You'll have to remove the 'data' from the store though, and loadData it after the grid has been rendered.