Ext.grid.GridPanel 的 loadMask 失效问题的解决

 			var store =  new Ext.data.Store({
	                    //code is here
                     })
 			store.load();
 			var grid = new Ext.grid.GridPanel( {
				title :'数据',
				id: 'detailGridId',
				renderTo :'topic-grid',
				width :800,
				height :600,
				frame :true,
				store :store,
				loadMask :true,
				stripeRows:true,
				viewConfig : {
					forceFit :true
				},
				cm:cm
			});

   如上写代码时,loadMask 没有生效,很奇怪的问题。

  --> 解决方法: store.load();放在 grid 生成之后,就会产生loadMask 的效果

  如下:

 			var store =  new Ext.data.Store({
				//code is here
			})
 			//store.load(); //load method is here , the loadMask attribute doesn't work
 			var grid = new Ext.grid.GridPanel( {
				title :'数据',
				id: 'detailGridId',
				renderTo :'topic-grid',
				width :800,
				height :600,
				frame :true,
				store :store,
				loadMask :true,
				stripeRows:true,
				viewConfig : {
					forceFit :true
				},
				cm:cm
			});
			store.load();//the load method should be here, the loadMask attribute works right.

 

你可能感兴趣的:(ext)