Some troubles with dt-responsible from Ajax Call Back

Some troubles with dt-responsible from Ajax Call Back

rhemanrheman Posts: 1Questions: 1Answers: 0
edited April 23 in Free community support

Hi everyone,

  • I am trying to daw a responsive datatable from jquery Ajax Call Back.
  • When I daw the datatable from jquery Ajax Call Back, The datatable is drew but it's not responsive.
  • All required libraries are loaded.

My source code looks as follown:

****** HTML CODE ******

<table id="dataTableYear" class="table-responsive table-bordered table-striped table-hover dt-responsive">



function loadWaterBalance(period){
                url: 'loadwaterbalancejsonfile?t='+$.now(),
                cache: false,
                type: 'POST',
                data: {
                  'period': period
                dataType: 'json',
                success: function (response) {
                  CallBack_loadWaterBalance(, response.columns);
                error: function (jqXhr, textStatus, errorMessage) { // error callback
                      alert('Error: ' + errorMessage);
                      complete : function(jqXHR, textStatus){

function CallBack_loadWaterBalance(datatable_array, datatable_column){
var table = $("#dataTableYear").dataTable({
        "serverSide": false,
        "searching": true,
        "ordering": false,
        "info": false,
        "paging": false,
        data: datatable_array,
        columns: datatable_column

Best regard,


  • colincolin Posts: 5,555Questions: 0Answers: 970

    Hi @rheman ,

    Either the table should have the class responsive, see here, or responsive should be set. If still no joy, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.



Sign In or Register to comment.