css on fixedcolumns

css on fixedcolumns

linusinvalinusinva Posts: 1Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Allan,

First of all, as others have said, your product is amazing! Thanks in advance for any insight you can lend.

Basically what I'm trying to do is apply some text color to the FixedColumns. I find that when I loop through tr and td nodes, I'm not able to reach the FixedColumns. I've been able to successfully reach these FixedColumns using fnUpdate (since I know the index of the fixed columns), but this function only allows editing of text, not applying styles. Sample code below.

Thanks again!
Linus.

http://live.datatables.net/edekid/2

Replies

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

    The thing here is that the 'fixed' columns are really just clones of the original elements - so in fact there are duplicates of the fixed columns - however your selector is quite 'selective' and only buzzing through the original table.

    For example - this is a slightly modification where the colours are applied before FixedColumns is initialised:
    http://live.datatables.net/edekid/3/edit

    This is an example that matches the table.dataTable elements (rather than the ID selector you had):
    http://live.datatables.net/edekid/4/edit (it does look slightly odd for some reason - but it shows the idea)

    And the final way is to have FixedColumns to a reclone, which is done by calling fnUpdate ( http://datatables.net/extras/fixedcolumns/api#fnUpdate ) as you mention.

    Allan
This discussion has been closed.