0

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.

1
  • Can you please share your js and html code Commented May 7, 2019 at 6:56

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.