Column widths are small. Height is too large.

Column widths are small. Height is too large.

canvoscanvos Posts: 3Questions: 0Answers: 0
edited January 2011 in General
I'm using DataTables to make tables with several grouped columns. My problem is that when I have a lot of columns the column headers become very skinny and tall... This is my intialization code :

[code]
$DataGrid = $('#dataGridTable').dataTable({
"sScrollY": 0,
"sScrollX": "100%",
"sScrollXInner": "125%",
"bJQueryUI": true,
"bAutoWidth": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [{"bSortable": false, "aTargets": [0]}],
"aaSorting": [[1,'desc']]
});
[/code]

Here's a screenshot :
http://flic.kr/p/9d1ZRY

Any help would be appreciated... The only way I can possibly get this to work is to somehow guess the exact size of the over-all table and set it as the sScrollXInner value.... but is there a better way???

Replies

  • canvoscanvos Posts: 3Questions: 0Answers: 0
    anyone...?
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Two options spring to mind:

    1. Remove sScrollXInner and set th { white-space: nowrap; } - which will force the column title text to all be on one line.
    2. Set sScrollXInner higher :-)

    Allan
  • canvoscanvos Posts: 3Questions: 0Answers: 0
    THANK YOU, Allan!!

    I knew it had to be something simple, I didn't even bother to think of white-space wrapping, *sigh*.... Thanks again.
This discussion has been closed.