aLengthMenu without 10
aLengthMenu without 10
rdmiller
Posts: 2Questions: 0Answers: 0
[code]jQuery('table')dataTable({
aLengthMenu: [[50,100,300,-1],[50,100,300,'All']]
});[/code]
The length menu looks fine.
But the table shows 10 entries, not 50. So, for example, to get a table with 50 entries I must first change to a different length and then change back.
aLengthMenu: [[50,100,300,-1],[50,100,300,'All']]
});[/code]
The length menu looks fine.
But the table shows 10 entries, not 50. So, for example, to get a table with 50 entries I must first change to a different length and then change back.
This discussion has been closed.
Replies
Regards,
Allan
That said, since this is something users of aLengthMenu should know about, perhaps the example code entry (or other mentions of aLengthMenu) should refer to it?
Alternatively, if iDisplayLength defaulted to first entry of aLengthMenu, that would be even nicer, but if you cannot guarantee aLengthMenu handling code happens before iDisplayLength handling code I can understand that.
But, anyways, I am ok on this issue. Thank you.
Thanks!
Allan
Ray
any suggestions?
[code]$('#fieldgrid').dataTable(
{
'bSort': false,
'bPagination' : false,
'bJQueryUI': true,
'aoColumns': [
{ 'sClass': 'col_fieldname' },
{ 'sClass': 'col_fieldtype' },
{ 'sClass': 'col_fieldformtype' },
{ 'sClass': 'col_fieldactions' },
],
'aLengthMenu': [50, 100],
'iDisplayStart': 50
});[/code]
Thanks
Note that "treehousetim" has pagination disabled in the code above, so obviously setting a page length is going to make no difference.
Allan