Column sizing
Column sizing
dwacek
Posts: 3Questions: 3Answers: 0
Can someone help I cant figure out why my datatable column sizes are not working correctly. Im wanting datatables to size columns based on data in my columns and what appears to happen is datatables is setting columns to a fixed length. Fields with a ID number or a data are as big as columns with large text. Im assigning column data with an ajax call and leaving most settings as default.
Any help would be much appreciated
$('#tbQMReports').dataTable({
"aaData": data.d,
"bProcessing": true,
"bDestroy": true,
"bDeferRender": false,
"aoColumns": [
{ "mData": "qmrID" },
{ "mData": "qmrSubDate" },
{ "mData": "qmrBranch" },
{ "mData": "qmrDept" },
{ "mData": "qmrDate" },
{ "mData": "qmrOwner" },
{ "mData": "qmPhysicianChamp"},
],
});
This discussion has been closed.
Answers
Useful thread on column sizing:
https://datatables.net/forums/discussion/12595/clarification-on-swidth
Also, we would need a link to a test case to be able to offer any specific help.
Allan