您有三個設置可以在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