Column Widths By Name Over Column Number?

Column Widths By Name Over Column Number?

kraftomatickraftomatic Posts: 78Questions: 13Answers: 0
edited July 2012 in General
Hey Allan,

I have a table that has between 5 and 12 columns. I'm having a small issue in that the smaller column header names are overlapping with the sort-arrow images. To fix this, I can of course widen the column, but when I'm doing that like this:

[code]
"aoColumnDefs": [ { "bSortable": false, "aTargets": [0] }, { "sWidth": "6%", "aTargets": [ 1 ] }, { "sWidth": "18%", "aTargets": [ 2, 3 ] }, { "sWidth": "7%", "aTargets": [ 4 ] }, { "sWidth": "9%", "aTargets": [ 5, 6, 7, 8, 9, 10, 11 ] } ]
[/code]

The problem I run into is that when the table is dynamic and only displays say, 8 columns - the widths are no longer accurate, and there's a JS error for an unspecified column, obviously.

My question is - can the column widths be referred to by a class name or some other method? Or is there another solution I might be missing?

Thanks.

Replies

This discussion has been closed.