Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82460

Setting column width and columns vs aoColumns

$
0
0

I wish to remove sorting on the first column and not display the sort arrow above it. Also, I'm getting "ghost row" of the sort columns underneath the header.

Also, should I be using "columns" or aoColumns? Are the quotes optional? I understand the difference of columns and columnDefs, but I don't know where those other names like aoColumns and aoColumnDefs. I think those are "legacy" and I have confused myself by finding examples with those in there. I want to just stick with what is in the latest documentation under http://datatables.net/reference/option/

Also, I would like to specify the column width of my checkbox column. the width does not seem to have an effect. Note that I am scrolling X.

I have DataTables 1.10 (latest stable build)

Here is my definition. I am attempting to create a js filddle of it and will post a link once I get it working.

    $(document).ready(function() {
var table = $('#example').DataTable(
{
scrollY: "300px",
scrollX: "100%",
scrollCollapse: true,
paging: false,
autoWidth: true, // must specify width in aoColumns if false
"columns": [ // there must be an entry for every column
{"width": "30px", "orderable": false},
null,
null,
null,
null,
null,
null,
null,
null,
null
]
});

new $.fn.dataTable.FixedColumns( table,
{
"leftColumns": 2
});
}
);

Viewing all articles
Browse latest Browse all 82460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>