C
C#3mo ago
newbie

i 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
GitHub
BulkyWeb_.Net_Core_MVC/BulkyWeb/wwwroot/js/product.js at master · b...
Contribute to buison1602/BulkyWeb_.Net_Core_MVC development by creating an account on GitHub.
1 Reply
Angius
Angius3mo ago
Been ages since I used jQuery last... but first thing I'd check is that ajax request Open the devtools, the network panel, see if the request returns what you expect it to return
Want results from more Discord servers?
Add your server