View Full Version : How to give loadMask in Tree and DataView?

8 Sep 2010, 5:06 AM

I am using Ext.tree.TreePanel. The data for the tree is retrieved from the DB and it take few seconds to do it. So i want to show some load mask text, say 'Loading...' to be displayed, when tree data is loading from DB.

The same issue is there for Ext.DataView. I tried giving loadMask. But it dint work out.

Is it possible to show such mask text in Tree & Data view?


8 Sep 2010, 5:24 AM
For a DataView you can create a LoadMask, but this only works when the dataview has a fixed height (the loadmask won't show it the dataview is initially height:0).

A tree already shows a loading indicator on the node that is expanding.

8 Sep 2010, 10:32 PM

I have given fixed height for DataView , loadMask dint work out.


myDataView = new Ext.DataView({
id: 'my_DataView'
,store: dataStore
,tpl: tpl
,multiSelect: true
,overClass: 'x-view-over'
,itemSelector: 'div.thumb-wrap'
,emptyText: '<span style="font-size:12px; font-weight: bold; margin: 25em;"> No data to display. <span>'
msg:'Loading Data...'

Is there any thing else , i have to configure to show the loadMask message?


9 Sep 2010, 12:06 AM
mask the panel where the dataview is in.

9 Sep 2010, 12:12 AM
DataView has no loadMask config option. You will have to create a LoadMask instance yourself in the render listener.

12 Sep 2010, 1:04 AM
I tried giving wait message in render listener and it worked fine. But i still had a problem. I am not able to recognize the event after the store is being loaded. If i can get some store event like after load, i can dispose the wait window after the store is being loaded.
Is there any way to recognize that store is being loaded?

12 Sep 2010, 2:33 AM
I found the solution.The callback is called after the load event is fired.