Default Text Label when pagelist empty


How can I set default text label when my pagelist has no items (empty)? Looks ugly if just showing blank screen.


You can define list as

var list = dhx.ui({ view:"list", ... ready:function(){ if (!this.dataCount()){ dhx.extend(this, dhx.ui.Overlay); this.showOverlay("There is no data"); } }, url:"data.php" });

above code will fire “ready” handler after initial data loading, and if no data loaded - will show overlay text other control ( you can use any html inside showOverlay )

Thanks for the advice. My code have some issues when extending object:

Uncaught TypeError: Cannot read property ‘Pb’ of undefined

It’s the same issue as my other question in the forum (extending KeyPress)

Such error can occurs if you are provide non-object as one of parameters of dhx.extend

Thanks for the pointer. But the ready event never get fired in my case here:

var recentInboxView = {
css: “basicBG”,

	alert (this.dataCount());
           if (!this.dataCount()){
              dhx.extend(this, dhx.ui.Overlay);
              this.showOverlay("There is no data");

scrollOffset:30 /*to stop scroll with 30px from the top edge of an item*/


I am using proxy as data source.

Instead of ready - you can use onXLE event or callback of load command.

Got the event, no error - but overlay doesn’t work :cry:

if (!this.dataCount()) {
alert (‘overlay’);
dhx.extend($$(“recentInboxList”), dhx.ui.Overlay);

There is no data


Sorry for inconvenience, there were some problem in dhtmlx touch code.
Updated js file and sample of usage are attached. (81.5 KB)

It works, with little bug: the loading icon pop up when I show the message. Can help to fix.


and may I know how to remove the overlay?

Add the next css rule to the page

.dhx_loading_overlay{ background:white; }