Reputation:
I am using jQuery data-table, initially that data-table will be blank after ajax call it will show data but some data and their heading is breaking. How to customize width of them that it should be show in a single line without break?
In HTML----
<th width="20%" align="left" valign="middle">ON US / ON UK</th>
<th width="20%" align="left" valign="middle">Merchant Percentage Commercial</th>
In JS Code---- I put width dynamically while getting data from ajax call.
"columns" : [{
"data" : "ON US/ ON UK",
"width" : "20%"
},
{
"data" : "merchant Percentage commercial",
"width" : "25%"
}]
I wants that all heading of datatable and data should come in one line without break.
Upvotes: 0
Views: 47
Reputation: 103
In order to achieve this, you may refer to https://datatables.net/forums/discussion/45615/how-to-load-table-from-ajax-request
also, look at this https://datatables.net/reference/option/ajax.data
Upvotes: 1