language.emptytable not working
language.emptytable not working

if there is no record found in database on query then only loading... shows instead of no record found in datatable, and there is error in console - Uncaught TypeError: Cannot read property 'error' of null. all working fine if there is more then 0 records found in database on query.
This discussion has been closed.
Replies
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Sounds like you have server side processing enabled. Start by looking at the response from the server when there are no rows found in the search. Take a look at the JSON response using the browser's network inspector tool. Use this technote for steps if needed.
EDIT: The server side response should look like this example. Click on the Ajax tab and perform a search that results in 0 records, type
zip
for example.Kevin
https://jyotionline.in/testcase
there is no pending status in database so database returning null and datatable showing loading instead of "No data available in table"
Yep, in that case, your script is returning
null
, which isn't valid JSON. It should return an empty array,[]
, if there are no entries.Colin
Thanks colin.
Finally I got Solution and it worked for me.