Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
加载掩码在extjs中不起作用_Extjs - Fatal编程技术网

加载掩码在extjs中不起作用

加载掩码在extjs中不起作用,extjs,Extjs,加载掩码不工作,我设置了属性loadMask:true,我仍然有相同的问题,我看不到loadMask控件,这个网格被添加到ui布局中,而且我使用了loadMask函数,我仍然有相同的问题,请告知 gridHistory = new Ext.grid.GridPanel({ id: "gvHistory", ddGroup: 'gridDDGroup', store: gridStore, renderTo: 'Hi

加载掩码不工作,我设置了属性
loadMask:true
,我仍然有相同的问题,我看不到loadMask控件,这个网格被添加到ui布局中,而且我使用了
loadMask
函数,我仍然有相同的问题,请告知

     gridHistory = new Ext.grid.GridPanel({
         id: "gvHistory",
         ddGroup: 'gridDDGroup',
         store: gridStore,
         renderTo: 'HistoryPanel',
         layout: 'fit',
         columns: cols,
         enableDragDrop: true,
         stripeRows: true,
         pageSize: 25,
         header: false,
         loadMask: true,
         autoScroll: true,
         autoExpandColumn: 'Position_ID',
         height: resolveHistoryGridHeight(),
         forceFit: true,
         autoFill: true,
         iconCls: 'icon-grid',
         tbar: [{
             tooltip: 'Reload',
             iconCls: 'reload',
             iconMask: true, 
             handler: function () { getPositionsHistory(); }
         }, '-', {
             tooltip: 'Clear',
             iconCls: 'clear',
             iconMask: true, 
             handler: function () { Clear(); }
         }
         , '-', {
             xtype: 'checkbox',
             name: 'field1',
             boxLabel: 'Draw Track',
             id: 'cb_draw_track',
             handler: function () { if (this.checked) { drawTrack(); } }
         }],
         selModel: new Ext.grid.RowSelectionModel({ singleSelect: false })
     });

loadMask
config没有任何效果的原因是网格的数据是内联定义的

var gridStore = new Ext.data.JsonStore({ fields: fields, data: myData, root: 'records'});
我的意思是,您没有从服务器加载数据。加载掩码只有在向服务器发出请求时才会显示在网格上,这就是为什么不显示加载掩码的原因


您可以将存储的数据属性改为URL,并从服务器返回JSON响应,但如果您可以使用内联数据,我不建议您这样做。

欢迎使用。在
标记中包围代码片段将使代码更易于阅读。(单击编辑器窗口附近的橙色帮助图标了解更多信息)加载掩码仅在底层存储从服务器请求记录时显示。如果在呈现网格之前已将数据加载到存储中,或者存储数据是内联的,则不会显示load maskJaitsu的注释。您能给我们看一下您的存储声明吗?var gridStore=new Ext.data.JsonStore({fields:fields,data:myData,root:'records'});谢谢你,jaitsu先生,但实际上我不明白你说的在线加载数据是什么意思。。。。实际上,我的主页上有这个网格,我从服务器加载数据,我有动态数据,因为我使用SQL server,我使用webservice检索这些数据,你能解释一下内联数据是什么意思吗?顺便说一下,我使用Ext.ComponentMgr.get(“gvHistory”).store.loadData(myData);加载我的网格