fnSetColumnVis and open rows

fnSetColumnVis and open rows

ambrauerambrauer Posts: 2Questions: 0Answers: 0
edited June 2010 in Bug reports
I believe I've stumbled across a problem with fnSetColumnVis. Here's the scenario:

1. Initialize a dataTable with one of the columns set to hidden (bVisible: false)
2. Open a row via fnOpen
3. Use fnSetColumnVis to show the initially hidden column

The "open" row does not correctly span the entire number of columns.
The fix appears to be simple - in fnSetColumnVis, change the line (near end of function - where it's looping through all open rows):
[code]oSettings.aoOpenRows[i].nTr.colSpan = _fnVisbleColumns( oSettings );[/code]
to:
[code]oSettings.aoOpenRows[i].nTr.firstChild.colSpan = _fnVisbleColumns( oSettings );[/code]

This way, it's setting the colspan on the td element (which it should be) and not the tr (which I don't believe is valid).

Replies

  • j_fosterj_foster Posts: 4Questions: 0Answers: 0
    I am also facing a similar issue;

    When I have injected / expanded row details and I then proceed to set a columnsVisibility, the injected / expanded rows details colspans are not the correct value - ie colspan=5 should be +/- the amount of columns added / removed.

    Is this a defect Allan or is this default behaviour?
This discussion has been closed.