Using Bootstrap 2 and bLengthChange=false
Using Bootstrap 2 and bLengthChange=false
cgarvey
Posts: 1Questions: 0Answers: 0
Hi!
I'm using version 1.9.1 and Bootstrap 2.0.3. All going well except when I disable the select/drop-down for records per page using...
[code]"bLengthChange":false[/code]
That does what I expect it to, but it generates an empty ...
[code][/code]
... for the left hand side (and the search box goes in to the right hand column of that grid row). Again, all makes sense. However, that empty column on the left means that Bootstrap styling doesn't render it as expected. The right-hand column (with search box) is now in the middle of the page, as though it was the first column. Bootstrap seems to be ignoring the empty column.
Ideally, we'd add a inserted in that empty , which causes Bootstrap to render the full width (6 grid cols) as expected. As a short term hack, I've added an additional CSS class to the "sDom" attribute, and use jQ to include a in there, as follows:[code]
$(document).ready(function() {
$('#tblTRN').dataTable( {
"sDom": "<'row'<'span6 dtForceSpace'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"bLengthChange": false,
} );
$(".dtForceSpace" ).html( $(".dtForceSpace" ).html() + " " );
} );
[/code]
So, am I missing some additional argument, or is this a simple issue that can be resolved?
I'm using version 1.9.1 and Bootstrap 2.0.3. All going well except when I disable the select/drop-down for records per page using...
[code]"bLengthChange":false[/code]
That does what I expect it to, but it generates an empty ...
[code][/code]
... for the left hand side (and the search box goes in to the right hand column of that grid row). Again, all makes sense. However, that empty column on the left means that Bootstrap styling doesn't render it as expected. The right-hand column (with search box) is now in the middle of the page, as though it was the first column. Bootstrap seems to be ignoring the empty column.
Ideally, we'd add a inserted in that empty , which causes Bootstrap to render the full width (6 grid cols) as expected. As a short term hack, I've added an additional CSS class to the "sDom" attribute, and use jQ to include a in there, as follows:[code]
$(document).ready(function() {
$('#tblTRN').dataTable( {
"sDom": "<'row'<'span6 dtForceSpace'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"bLengthChange": false,
} );
$(".dtForceSpace" ).html( $(".dtForceSpace" ).html() + " " );
} );
[/code]
So, am I missing some additional argument, or is this a simple issue that can be resolved?
This discussion has been closed.
Replies
Allan