fnSetColumnVis and open rows
fnSetColumnVis and open rows
ambrauer
Posts: 2Questions: 0Answers: 0
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).
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).
This discussion has been closed.
Replies
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?