Extjs 如何在网格不包含数据时隐藏editview(在Ext.js中)
我是ext.js的新手。我想在网格不包含数据时隐藏视图面板。我还想在该隐藏位置显示一条空数据消息。请帮助我。如果表定义:Extjs 如何在网格不包含数据时隐藏editview(在Ext.js中),extjs,Extjs,我是ext.js的新手。我想在网格不包含数据时隐藏视图面板。我还想在该隐藏位置显示一条空数据消息。请帮助我。如果表定义: initComponent:function() { var me = this; me.viewConfig = { deferEmptyText: false, emptyText: notifyMessage( 'No events', 'In this device, t
initComponent:function() {
var me = this;
me.viewConfig = {
deferEmptyText: false,
emptyText: notifyMessage(
'No events',
'In this device, there are no events in the selected period.'
)
};
me.callParent(arguments);
}
函数返回的消息布局可能是:
function notifyMessage (msg, lmsg, img) {
var image = img || '/img/info.png';
var message = msg || '';
var little_message = lmsg || '';
return Ext.String.format(
'<div class="grid-data-empty">' +
'<img src="{0}" width=100 height=100 alt="" />' +
'<div class="empty-grid-headline">{1}</div>' +
'<div class="empty-grid-byline">{2}</div>' +
'</div>',
image,
message,
little_message
)
);
函数notifyMessage(msg、lmsg、img){
var image=img | |'/img/info.png';
var message=msg | |“”;
var little_message=lmsg | |“”;
返回Ext.String.format(
'' +
'' +
'{1}' +
'{2}' +
'',
形象,,
消息
小消息
)
);
我不知道为什么/是否要隐藏网格。你看了吗?这在空网格中显示了一条空数据消息,无需编写任何花哨的程序。它不能与emptyText一起使用,因为该文本将显示在网格中。我希望它显示在viewpanel中