sort column the column width will change

sort column the column width will change

BennyxuBennyxu Posts: 22Questions: 3Answers: 0

Dear

We encounter one datatables issue, when I set "scrollX": true, the datatable width will change when sort any column, if disable "scrollX", the column width is fixed when sort columns, how can i do, is there any resolve solusion, thanks a lot.

Benny

Answers

  • BennyxuBennyxu Posts: 22Questions: 3Answers: 0

    below is the key parameters
    "scrollX": true,
    "searching": false,
    "sDom": TableDOM_Init(),
    "bInfo": false,
    "autoWidth": false,
    "paginate": false,
    "sort": true,
    "oLanguage": {
    "sLoadingRecords":"no data avaliable"
    },

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I would strongly suggest you remove the autoWidth: false option and allow DataTables to compute the optimal column widths. That send, it is possible that the column widths will change depending on the content of the table. We'd need to see an example page to be able to understand the issue further.

    Thanks,
    Allan

This discussion has been closed.