fixed column can not working

fixed column can not working

tiaraxnjaemtiaraxnjaem Posts: 17Questions: 5Answers: 0

here is my code.. and the fixedColumn can not working

responsive: true,
data: setGdata,
scrollX: false, //edited
scrollCollapse: false,
"bSort": false,
"paging": false,
fixedColumns: {
leftColumns: 1
},
"columnDefs": [
{"width": "180px", "targets": 0},
],

i dunno what to do again

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    As you can see on the compatibility table, Responsive and FixedColumn extension don't play together - as they're both solving the same issue (small viewing areas).

    Colin

  • tiaraxnjaemtiaraxnjaem Posts: 17Questions: 5Answers: 0

    so, what should i do?

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Choose one or the other, or neither, just not both as they're incompatible...

    Colin

  • tiaraxnjaemtiaraxnjaem Posts: 17Questions: 5Answers: 0

    i tried like this code but My table's messed up..

    data: setGdata,
    scrollX: true,
    scrollCollapse: true,
    "bSort": true,
    "paging": false,
    "ordering": false,
    "fixedHeader": {
    "header": false,
    "footer": false
    },
    "columnDefs": [
    {"width": "180px", "targets": 0}
    ],
    "columns": performanceTableColumn
    ,

  • tiaraxnjaemtiaraxnjaem Posts: 17Questions: 5Answers: 0

    and i tried this code, the fiixed columns is working but my table's messed up...

    data: setGdata,
    scrollX: true,
    scrollCollapse: true,
    "bSort": true,
    "paging": false,
    "ordering": false,
    fixedColumns: {
    leftColumns: 1
    },
    "columnDefs": [
    {"width": "180px", "targets": 0}
    ],
    "columns": performanceTableColumn
    ,

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    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.

    Cheers,

    Colin

  • tiaraxnjaemtiaraxnjaem Posts: 17Questions: 5Answers: 0

    thank you for your response^^
    this link to a test case https://codepen.io/tiara-hardiyanti/pen/VwmKPJG
    the fixed column can not working.

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    It looks like you haven't loaded jQuery on that page - it needs to be loaded before any DataTables libraries.

    Colin

This discussion has been closed.