iDisplayLength issue
iDisplayLength issue
I am trying to change the default number of records that show up but no matter what value I set in the iDisplayLength the table only shows 10 records at a time.
Any thoughts on why this is happening?
[code] $('#walkthrough-table').dataTable({
"bPaginate": true,
"bFilter": true,
"bSort": true,
"bAutoWidth": false,
"sDom": '<"top"f<"advanced-search-wrap">>t<"bottom"lip>',
"iDisplayLength ": 50,
"aaSorting": [[ 6, "desc" ]],
'aoColumns' : [
{ 'sName': 'entry.publish_status', 'bSortable': false },
{ 'sName': 'entry.entry_id'},
{ 'sName': 'employee_name'},
{ 'sName': 'employee.first_name', 'bVisible': false },
{ 'sName': 'building.building_name'},
{ 'sName': 'entry.observed_by' },
{ 'sName': 'entry.date_submitted' },
{ 'sName': 'functions', 'bSortable': false },
],
"sAjaxSource": "<?php echo site_url('ajax/walkthrough/get_table_data'); ?>",
});
//Create the advanced search box w/ link
$('.advanced-search-wrap').html('Advanced Search');
[/code]
Any thoughts on why this is happening?
[code] $('#walkthrough-table').dataTable({
"bPaginate": true,
"bFilter": true,
"bSort": true,
"bAutoWidth": false,
"sDom": '<"top"f<"advanced-search-wrap">>t<"bottom"lip>',
"iDisplayLength ": 50,
"aaSorting": [[ 6, "desc" ]],
'aoColumns' : [
{ 'sName': 'entry.publish_status', 'bSortable': false },
{ 'sName': 'entry.entry_id'},
{ 'sName': 'employee_name'},
{ 'sName': 'employee.first_name', 'bVisible': false },
{ 'sName': 'building.building_name'},
{ 'sName': 'entry.observed_by' },
{ 'sName': 'entry.date_submitted' },
{ 'sName': 'functions', 'bSortable': false },
],
"sAjaxSource": "<?php echo site_url('ajax/walkthrough/get_table_data'); ?>",
});
//Create the advanced search box w/ link
$('.advanced-search-wrap').html('Advanced Search');
[/code]
This discussion has been closed.
Replies
Thank you. I can't believe I overlooked that I need to take a nap.
here is my code
[code]
$(document).ready(function () {
$('#dtfDATA').dataTable({
"iDisplayLength": 50
});
});
[/code]
and i work with the latest version (1.9...)
I tried with the script BEFORE and AFTER the table....NADA...same problem
Thanks for ANY help
Allan