<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<STYLE type=text/css><!-- DIV {margin:0px;} --></STYLE>
<META content="MSHTML 6.00.6002.18332" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial size=2>The docs state that the loadMask config property
should either be a Boolean or an Ext.LoadMask config. So that is where you
should configure the mask, not in the show event listener. The docs are
incomplete in that they don't tell you that you actually only need to supply the
Ext.LoadMask options portion of the Ext.LoadMask constructor and that the grid
is also binding the grid's store and that config option is not needed (it will
be overwritten if you do add it). This means that you really only need to supply
the 'msg' option for the loadMask unless you need to give it a different CSS
class or only want it show the very first time the grid's data store is
loaded.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the source code from Ext.GridPanel's
initEvents function</FONT></DIV>
<DIV><FONT face=Arial size=2>// private<BR> initEvents :
function(){<BR>
Ext.grid.GridPanel.superclass.initEvents.call(this);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
if(this.loadMask){<BR>
this.loadMask = new
Ext.LoadMask(this.bwrap,<BR>
Ext.apply({store:this.store},
this.loadMask));<BR>
}<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2>So a better config your grid's loadMask property
would be:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>loadMask:{msg:'Daten werden
geladen...'},</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hope that helps</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT></DIV>
<DIV><FONT face=Arial size=2>Kestrel Computer Consulting</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title="mailto:robertdbuckley@yahoo.com CTRL + Click to follow link"
href="mailto:robertdbuckley@yahoo.com">Robert Buckley</A> </DIV>
<DIV><B>Sent:</B> Wednesday, January 12, 2011 10:24 AM</DIV>
<DIV><B>To:</B> <A
title="mailto:users@geoext.org CTRL + Click to follow link"
href="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> [Users] Loading mask in grid</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV
style="FONT-SIZE: 8pt; FONT-FAMILY: arial,helvetica,sans-serif">Hi,<BR><BR>I´m
trying to put a loading mask into a grid whilst it´s being loaded. This seems to
be rather problematic althought the examples make it seem easy.<BR><BR><BR>
<DIV>Here is my code without the mask.<BR><BR>var wea_attribgridPanel = new
Ext.grid.GridPanel({<BR> title:
"Tabelle",<BR> region:
"center",<BR> autoWidth :
true,<BR> stripeRows:
true,<BR> height:
350,<BR> loadMask:
true,<BR> viewConfig:
{<BR> forceFit: true<BR>
},<BR> store:
wea_store,<BR> sm: new
GeoExt.grid.FeatureSelectionModel(),<BR>
cm: new Ext.grid.ColumnModel({<BR>
defaults: {<BR>
sortable: true<BR>
},<BR>
columns: [{<BR>
header:
"Bez",<BR>
dataIndex: "Bez",<BR>
width: 25<BR>
}, {<BR>
header:
"Standort",<BR>
dataIndex: "Standort"<BR>
}, {<BR>
header:
"Betreiber",<BR>
dataIndex: "Betreiber",<BR>
width:
135<BR>
}]<BR> }),<BR>
bbar: [{<BR>
text: "an Auswahl heranzoomen",<BR>
handler: function(){<BR>
wea_attribgridPanel.getSelectionModel().each(function(rec){<BR>
var
feature = rec.get("feature");<BR>
wea_mapPanel.map.zoomToExtent(feature.geometry.getBounds());<BR>
})<BR>
}<BR> },toolbarItems]<BR>
});<BR><BR><BR> I though If I put this in after the bbar it would work, but
nothing happens<BR><BR>listeners:{show:function() {<BR>
this.loadMask = new Ext.LoadMask(this.body,
{<BR> msg:'Daten werden
geladen...'<BR>
});<BR> }}<BR><BR><BR><BR>could
anyone offer any assistance?<BR><BR>thanks,<BR><BR>Robert<BR></DIV></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>