how to fix the 2 columns in the left side of a table
how to fix the 2 columns in the left side of a table
Hi, i hope one of you will know the answer to my problem : how to fix the 2 columns in the left side of a table
First, i take the js library with fixedColumns inside : http://datatables.net/download/index
I installed on my PC the example given by : https://datatables.net/examples/basic_init/multi_col_sort.html
I would like to fix the 2 columns on the left of this table (i installed it on my PC) :
FixedComulns : http://datatables.net/extensions/fixedcolumns/
But it doesn't work (no scrollbar appears), and i do not know how to fix the 2 left columns ...
$(document).ready(function() {
$('#example').DataTable( {
fixedColumns: true => doesn't work
} );
} );
Answers
It works :
$(document).ready( function () {
$('#request_table').DataTable({
data : ... ,
columns : [ ... ],
sScrollX: "100%",
sScrollXInner: "150%",
scrollCollapse: true,
paging: true,
fixedColumns: {
leftColumns: 2
}
});