what is wrong on my Json? generated using Datatables CodeIgniter Library

what is wrong on my Json? generated using Datatables CodeIgniter Library

foxmedofoxmedo Posts: 19Questions: 3Answers: 0

Hello,

Plz what wrong on my json generated using Datatables CodeIgniter Library

im getting error http://datatables.net/tn/4

i'dont know but it may cause of columns titles

{"draw":0,"recordsTotal":"8","recordsFiltered":"8","data":[{"id":"1991","code_prodint":"","designation":"Cheng Shin CR-966 Trailermaxx 125R12C 81J","type_produit":"PNT","collection_id":"154"},{"id":"2113","code_prodint":"","designation":"Camac CJ-110 6-16 95J","type_produit":"PNT","collection_id":"168"},{"id":"9530","code_prodint":"","designation":"Starco ST-182 7-15 114J\/112L","type_produit":"PNT","collection_id":"705"},{"id":"11543","code_prodint":"","designation":"Sava B-14 Cargo 3.5-10 59J","type_produit":"PNT","collection_id":"839"},{"id":"21385","code_prodint":"","designation":"Maxxis Trailermaxx CR-966 125R12C 81J","type_produit":"PNT","collection_id":"1401"},{"id":"22480","code_prodint":"","designation":"Maxxis UN-999 CS 140\/70 R12C 86J","type_produit":"PNT","collection_id":"1485"},{"id":"26327","code_prodint":"","designation":"Heidenau P30 4.8-10 57J","type_produit":"PNT","collection_id":"1760"},{"id":"38574","code_prodint":"","designation":"Avon Trailer 950 185\/70 R13C 106\/104J","type_produit":"PNT","collection_id":"2549"}]}

Replies

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    The JSON returned looks ok. I suspect the problem is that you haven't defined columns.data in your Datatables init code. You need to define this option since the JSON response has data objects. If this doesn't help please post your Datatables init code.

    Kevin

This discussion has been closed.