开发者

Empty message in gridPanel

I'm using Extjs gridPanel to display data. I want to show "No data..." message in gridPanel when no data available. How to do th开发者_开发知识库is ?.

I tried emptyText property but its not worked.

I think emptyText is for gridView not for gridPanel.

Please help me how to show empty data message in gridPanel.(I'm using gridPanel not grid View)


You answered your own question -- it is indeed a GridView property. So to specify it in the GridPanel (which uses a GridView internally) just do this:

myGrid = new Ext.GridPanel({
    viewConfig: {
        emptyText: 'No records'
    }
});

Per the comments below, you might also include deferEmptyText: false in the viewConfig for the text to render immediately (otherwise it waits until after the initial store load is complete).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜