How to access the Fixed Column table?

How to access the Fixed Column table?

craigg75craigg75 Posts: 3Questions: 2Answers: 0

How can I get access to the fixed column rows that are being displayed? Not the ones that the user interacts with and that the DataTable API can give you access to. For instance I need to be able to change the background color of a set of the rows if x happens. I keep thinking I can get to it by $("#tableID").DataTable().fixedColumns().rows() but that just gets me back to the underlying DataTable rows, which are the wrong ones. Thanks.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    What I would typically suggest here is that you update the background row (which is the one the DataTable API will give you) and then call fixedColumns().update() to redraw the FixedColumn which will then match the new styling.

    Allan

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Hi @craigg75 ,

    Here's an example of that: http://live.datatables.net/vinuhohi/1/edit

    Cheers,

    Colin

  • craigg75craigg75 Posts: 3Questions: 2Answers: 0

    Thanks Allan,

    It was late, I should have seen that. Thanks man. Thanks for the example Colin!

    Craig

This discussion has been closed.