I am getting data by ajax to my datatable but the view is squeezed.
I am getting data by ajax to my datatable but the view is squeezed.
![AsifAziz](https://secure.gravatar.com/avatar/a18b0edf632ea1a8999fbd314c90a8ce/?default=https%3A%2F%2Fvanillicon.com%2Fa18b0edf632ea1a8999fbd314c90a8ce_200.png&rating=g&size=120)
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
This discussion has been closed.
Answers
Same setting is working fine on other pages
when I comment this code and give data manually to datatable then it work fine.
"columns": [
{ "data": "Id" },
{ "data": "GrossTotal" },
{ "data": "Discount" },
{ "data": "Tax" },
{ "data": "NetTotal" },
{ "data": "IsReceived" }
A couple typical issues are that you might need to add
style="width:100%"
to yourtable
tag as shown in this example. You might need to usecolumns.adjust()
, if the table is hidden when initialized, as show in this example. These are a couple of typical issues found in the forum.If this doesn't help then please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thanks a lot @kthorngren .
Issue resolved with style=width:100%