FixedColumns
FixedColumns
ddudley3
Posts: 20Questions: 0Answers: 0
Having troubles getting the example for this to work.
http://datatables.net/release-datatables/extras/FixedColumns/index.html
using FF v19.0.2
have the following html (more than 6 cols obv)
[code]
Test
@import "media/css/demo_page.css";
@import "media/css/demo_table.css";
@import "media/css/style.css";
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"sScrollX": 200,
"bProcessing": true,
"sAjaxSource": 'newjson.txt'
}
);
new FixedColumns( oTable );
} );
Col 1
Col 2
Col 3
Col 4
Col 5
Col 6
[/code]
Am I missing something? It's not fixing the first column in this scenario. Nor is the example one on your website if you hit the jsbin option on the page.
http://datatables.net/release-datatables/extras/FixedColumns/index.html
using FF v19.0.2
have the following html (more than 6 cols obv)
[code]
Test
@import "media/css/demo_page.css";
@import "media/css/demo_table.css";
@import "media/css/style.css";
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"sScrollX": 200,
"bProcessing": true,
"sAjaxSource": 'newjson.txt'
}
);
new FixedColumns( oTable );
} );
Col 1
Col 2
Col 3
Col 4
Col 5
Col 6
[/code]
Am I missing something? It's not fixing the first column in this scenario. Nor is the example one on your website if you hit the jsbin option on the page.
This discussion has been closed.
Replies
I'd also say that sScrollX should never be anything other than `"100%"` . It can be 200 or anything else, but you'd be much better off making the overall container 200px if that is what you need.
Allan
Allan
[code]Live.datatables.net[/code]
includes everything by default such as
[code]
[/code]
?
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"sScrollX": "100%"
}
);
new FixedColumns( oTable );
} );
[/code]
and you will see it's not happening.
Looks like it is working to me. The table there doesn't need scrolling, so it doesn't use it.
Allan
Javascript side
[code]
$(document).ready(function() {
var oTable = $('#example').dataTable( {
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"bPaginate": false,
}
);
new FixedColumns( oTable );
} );
[/code]
Html side has all standard stuff.
Added
[code]
[/code]
in the head tag
and
used this for every column (could not paste all of the html.. ran over number of chars for post)
add many more
[code]
Col 1
Col 2
Col 3
Col 4
Col 5
Col 6
Col 7
Col 8
Col 9
Col 10
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
[/code]