ExtJs 4.x 学习小记:Ext.grid.Panel禁止显示loading......
2014-03-27 14:41
459 查看
Ext.grid.Panel在通过store加载数据时,会默认显示一个 loading... 的提示,如何隐藏,可以通过下面方法实现。
第一,创建panel后,设置panel的view的loadMask属性
fileGridPanel.view.loadMask = false;
var fileGridPanel = Ext.create('Ext.grid.Panel',{
id:'filegrid',
layout:'fit',
store:store,
autoExpandColumn:true,
columns:[
{text:'编号',dataIndex:'filecode',width:80},
{text:'文件名',dataIndex:'filename',flex:1},
{text:'扩展名',dataIndex:'fileext',hidden:true},
{text:'操作',xtype:'actioncolumn',width:80,
items:[{
iconCls:'delicon',
tooltip:'删除',
handler: deleteGridRecord
},
{
iconCls:'saveicon',
tooltip:'下载',
handler: downloadFileInGrid
},
{
iconCls:'editicon',
tooltip:'编辑',
handler: function(grid, rowIndex, colIndex){
var rec = grid.getStore().getAt(rowIndex);
setFileInfo(OPERATION_EDIT,rec);
}
}]
}],
dockedItems:[{
xtype:'toolbar',
dock:'top',
items:[searchbar]
},{
xtype:'toolbar',
dock:'top',
items:[funcbar]}],
bbar:Ext.create('Ext.PagingToolbar',{
store:store,
displayInfo:true,
displayMsg:'显示{0}-{1}条,共{2}条',
emptyMsg:'无数据'
})
});
fileGridPanel.view.loadMask = false;
第二,使用viewConfig
var fileGridPanel = Ext.create('Ext.grid.Panel',{
id:'filegrid',
layout:'fit',
store:store,
autoExpandColumn:true,
viewConfig:{
loadMask:false
},
第一,创建panel后,设置panel的view的loadMask属性
fileGridPanel.view.loadMask = false;
var fileGridPanel = Ext.create('Ext.grid.Panel',{
id:'filegrid',
layout:'fit',
store:store,
autoExpandColumn:true,
columns:[
{text:'编号',dataIndex:'filecode',width:80},
{text:'文件名',dataIndex:'filename',flex:1},
{text:'扩展名',dataIndex:'fileext',hidden:true},
{text:'操作',xtype:'actioncolumn',width:80,
items:[{
iconCls:'delicon',
tooltip:'删除',
handler: deleteGridRecord
},
{
iconCls:'saveicon',
tooltip:'下载',
handler: downloadFileInGrid
},
{
iconCls:'editicon',
tooltip:'编辑',
handler: function(grid, rowIndex, colIndex){
var rec = grid.getStore().getAt(rowIndex);
setFileInfo(OPERATION_EDIT,rec);
}
}]
}],
dockedItems:[{
xtype:'toolbar',
dock:'top',
items:[searchbar]
},{
xtype:'toolbar',
dock:'top',
items:[funcbar]}],
bbar:Ext.create('Ext.PagingToolbar',{
store:store,
displayInfo:true,
displayMsg:'显示{0}-{1}条,共{2}条',
emptyMsg:'无数据'
})
});
fileGridPanel.view.loadMask = false;
第二,使用viewConfig
var fileGridPanel = Ext.create('Ext.grid.Panel',{
id:'filegrid',
layout:'fit',
store:store,
autoExpandColumn:true,
viewConfig:{
loadMask:false
},
相关文章推荐
- ExtJs 4.x 学习小记:Ext.TabPanel动态隐藏及显示
- Extjs学习 Ext.grid.GridPanel
- Extjs 学习 --Ext.grid.GridPanel()(一)
- Ext.Net学习笔记17:Ext.Net GridPanel Selection
- 在Ext.grid.GridPanel中每次都显示最后一条记录
- extjs中如何创建一个带分页功能的Ext.grid.GridPanel
- EXTJS学习系列提高篇:第一篇(转载)作者殷良胜,用EXT2.2+vs.2008.net+C#动态生成GridPanel
- ExtJs学习系列(2)--Ext.Panel
- ExtJs学习笔记(2)_Basic GridPanel[基本网格]
- ExtJS学习笔记(5)- Form表单的提交 -Ext.FormPanel
- ExtJs之Ext.grid.GridPanel(部分未完)
- Extjs-表格 Ext.grid.GridPanel
- Extjs 的GridPanel剔除隐藏列在menuDisabled 显示。
- Ext.Net 1.x_Ext.Net.GridPanel之Access数据库分页显示
- Extjs EditorGridPanel中ComboBox列的显示问题
- ExtJS 4学习之GridPanel
- ExtJs学习系列之 GridPanel:Ext.grid.ColumnModel 列配置属性说明
- Extjs的gridpanel数据在IE中无法显示的问题
- ExtJs学习系列(5)--Ext.TabPanel
- 使用Ext.grid.Panel显示远程数据