ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: mikep on February 27, 2020, 03:39:06 am

Title: "undefined" when no record in grid
Post by: mikep on February 27, 2020, 03:39:06 am
If I'm loading a grid based on search results, and there is no data returned from the search, the grid displays "undefined". Can I change the text to something like "No results available"?
Title: Re: "undefined" when no record in grid
Post by: paramvir on February 27, 2020, 10:18:05 am
Please include localization file from localize folder in SDK and you can modify that file to display your custom messages.
Title: Re: "undefined" when no record in grid
Post by: mikep on February 27, 2020, 07:19:36 pm
I've included the file, pq-localize-en.js, in my page. However, I don't see how I change it, since "undefined" is not listed anywhere in this file.
Title: Re: "undefined" when no record in grid
Post by: paramvir on February 27, 2020, 08:03:51 pm
There is no other reason to display "undefined".

Please share a jsfiddle so that it can be checked.
Title: Re: "undefined" when no record in grid
Post by: mikep on February 27, 2020, 08:46:17 pm
How do I modify the file, pq-localize-en.js, to change the word "undefined" to "No search results returned"? I don't want to see "undefined" anything in the grid.
Title: Re: "undefined" when no record in grid
Post by: paramvir on February 27, 2020, 08:59:08 pm
Default entry is strNoRows:  "No rows to display." in pq-localize-en.js

Please ensure localization file is included in correct order: https://paramquery.com/pro/tutorial#topic-include

If you still see "undefined", then it means something is wrong in your code / configuration. Please share a jsfiddle so that it can be checked.
Title: Re: "undefined" when no record in grid
Post by: mikep on February 27, 2020, 09:24:48 pm
If I'm not getting any data back, I don't want "undefined"

https://jsfiddle.net/mq2xavcz/2/
Title: Re: "undefined" when no record in grid
Post by: paramvir on February 27, 2020, 10:00:58 pm
Please check the result after including localization file: https://jsfiddle.net/s546L0rp/