That’s a demo of how to clear the grid when clicking a button, not how to handle an empty result. At what stage of the process (involving asynchronous callbacks) do you suggest invoking an explicit clear?
The search result is correct in returning zero results, but what is incorrect is how the grid handles that input. Am I asking too much for that simple feature to work correctly like it does in other cases that don’t use virtual mode?
I think I found the exact problem and a neat fix. (jqw version 4.3.0) in jqxdata.js:1838 I changed this line:
if (requestedData.totalrecords) {
to this:
if (requestedData.totalrecords || requestedData.totalrecords === 0) {
and that appears to have resolved the problem completely. I’ll add this patch along with the other fixes in my build process, but it would be nice to get real solutions to issues like this.