I am using this code
If anyone uses filter with dataSource, you should watch for dataSource.filteredData.length.
filter
dataSource
dataSource.filteredData.length
i.e.
if (this.dataSource.filteredData.length < 1) { this.presentDialog(); }
or
// Your message here...