Column visibility with page length option
Column visibility with page length option
PaulFreeWebs
Posts: 63Questions: 4Answers: 1
I want to have both these options display, but I can only make one show, I have tried changing
"dom": 'Bfrtip'
to "ldom": 'Bfrtip'"
but this still wont work, here is the whole code I have used
$(document).ready(function() {
$('#powers').DataTable( {
"dom": 'Bfrtip',
"buttons": [
{
"extend": 'colvis',
"collectionLayout": 'fixed two-column',
"postfixButtons": [ 'colvisRestore' ]
}
],
"columnDefs": [
{
"targets": -1,
"visible": false
}
],
"select": 'multi',
"iDisplayLength": 100,
"aLengthMenu": [[ 50, 100, 200, 300, 400, -1], [50, 100, 200, 300, 400, "All"]],
"bsort": false,
"scrollY": 800,
"stateSave": true,
"stateDuration": 0,
"oLanguage": {
"sEmptyTable": "No Powers To Display",
"sZeroRecords": "The power you entered has not been found",
"sPaginationType": "full_numbers",
"sLengthMenu": " _MENU_ Powers per page",
"sProcessing": "DataTables is currently busy",
"sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_) "
}
} );
} );
thanks in advanced
This discussion has been closed.
Replies
There is no
ldom
option. The property name isdom
as the documentation notes.If you want the length parameter to show, add the
l
to the string value (the right hand side).I would suggest reading through the
dom
documentation which explains at length how that option operates.Allan
Oh, thats how you do it, I have read though the dom options but cant see if there is a center option, as wanted to make http://prntscr.com/88mxs5 next to each other
No - the
dom
option is entirely about the order of the DOM elements. For visual alignment you need to use CSS.Allan
ok, thanks for the reply, maybe a update in the future to allow this?
I do plan some limited layout support in future, but really it is a solved problem through CSS already.
Allan