PDA

View Full Version : ext.getcmp giving problem...



mama
11 Sep 2008, 7:51 AM
hey,
as i am newbie , facing problem in ext.getcmp


gridMask = new Ext.LoadMask(Ext.getCmp('publicTreeGrid'), {msg:"Loading reports, please wait...",id:"gridMask"});


this give me error this.el is null or not an object...

i am using gridMask (LoadMask) for grid having id publicTreeGrid and not for whole page..

plz help asap tc

Darklight
11 Sep 2008, 7:55 AM
try Ext.getCmp('publicTreeGrid').getEl()

mama
11 Sep 2008, 7:58 AM
window.loadingMask = new Ext.LoadMask(Ext.getCmp('publicTreeGrid').getEl(), {msg:"Loading data, please wait...",id:"loadingMask"});


this is also not working and givin same error...reply asap plzzz

devnull
11 Sep 2008, 8:03 AM
Why not just configure a loadMask right in the grid's constructor instead? ('loadMask' config option).

mama
11 Sep 2008, 8:05 AM
tht can be done , but i want to do this way..why it is not working but..?
take care

devnull
11 Sep 2008, 8:24 AM
I would be curious to know why you want to to it this way, since if you configure it in the constructor the hide/show events will be managed for you automatically...
But I am betting the error is because you are trying to create the loadMask before the grid has been rendered, which will not work.

mama
11 Sep 2008, 8:31 AM
thanks dude...but i also tried using it in side render listener of grid...but still its giving problem...