newbie
Explore posts from serversi cant load data from DB to dataTable
Link to my github: https://github.com/buison1602/BulkyWeb_.Net_Core_MVC/blob/master/BulkyWeb/wwwroot/js/product.js
Error:
jquery.min.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at S.fn.init.data (jquery.min.js:2:34508)
at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:4:3792)
at Function.each (jquery.min.js:2:3003)
at S.fn.init.each (jquery.min.js:2:1481)
at S.fn.init.C [as dataTable] (jquery.dataTables.min.js:4:3517)
at P.fn.DataTable (jquery.dataTables.min.js:4:86411)
at loadDataTable (product.js:7:31)
at HTMLDocument.<anonymous> (product.js:3:5)
at e (jquery.min.js:2:30087)
at t (jquery.min.js:2:30389)
On page D:\Work_C#\Pet_project\BulkyWeb\BulkyWeb\wwwroot\js\product.js
I watched 2 videos 101: DataTables API and 102: Load DataTable.
I followed but could not load data to the datatable
You can see the photo I sent below. Image includes page https://localhost:7169/Admin/Product with data not displayed
and error below
I watched 2 videos, each 3 to 4 times. I asked chatGPT, gemini but still couldn't find the answer
3 replies