您有三个设置可以在DataGrid上应用于消息。
下面是默认设置:
// loadingMessage: String
// Message that shows while the grid is loading
loadingMessage: "<span class='dojoxGridLoading'>${loadingState}</span>",
// errorMessage: String
// Message that shows when the grid encounters an error loading
errorMessage: "<span class='dojoxGridError'>${errorState}</span>",
// noDataMessage: String
// Message that shows if the grid has no data - wrap it in a
// span with class 'dojoxGridNoData' if you want it to be
// styled similar to the loading and error messages
noDataMessage: "",
因此,例如,您的数据加载时,你可以设置此类似:
new EnhancedGrid({ // This can be DataGrid() also..
structure: layout,
store : store,
noDataMessage: "No Items Found.",
loadingMessage: "<span class='dojoxGridLoading'>Loading Really Awesome Stuff</span>"
}, node);
感谢。我如何获得默认显示?我原以为默认设置就可以开箱即用。 – Craig
是的,默认值可以正常工作。但“默认”只是一个加载图标。 – Layke
我感谢您的帮助。似乎无法得到任何东西火。 – Craig