ParamQuery Grid
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
"undefined" when no record in grid
« previous
next »
Print
Pages: [
1
]
Author
Topic: "undefined" when no record in grid (Read 3526 times)
mikep
Pro Ultimate
Full Member
Posts: 163
"undefined" when no record in grid
«
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"?
Logged
paramvir
Administrator
Hero Member
Posts: 6310
Re: "undefined" when no record in grid
«
Reply #1 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.
Logged
mikep
Pro Ultimate
Full Member
Posts: 163
Re: "undefined" when no record in grid
«
Reply #2 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.
Logged
paramvir
Administrator
Hero Member
Posts: 6310
Re: "undefined" when no record in grid
«
Reply #3 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.
«
Last Edit: February 27, 2020, 08:32:49 pm by paramvir
»
Logged
mikep
Pro Ultimate
Full Member
Posts: 163
Re: "undefined" when no record in grid
«
Reply #4 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.
Logged
paramvir
Administrator
Hero Member
Posts: 6310
Re: "undefined" when no record in grid
«
Reply #5 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.
«
Last Edit: February 27, 2020, 09:03:49 pm by paramvir
»
Logged
mikep
Pro Ultimate
Full Member
Posts: 163
Re: "undefined" when no record in grid
«
Reply #6 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/
Logged
paramvir
Administrator
Hero Member
Posts: 6310
Re: "undefined" when no record in grid
«
Reply #7 on:
February 27, 2020, 10:00:58 pm »
Please check the result after including localization file:
https://jsfiddle.net/s546L0rp/
Logged
Print
Pages: [
1
]
« previous
next »
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
"undefined" when no record in grid