i am working with http://datatables.net/ within a grails application this is my initialization code:
<g:javascript>
$(document).ready(function () {
var oTable = $('#projectTable').dataTable({
"bSort": false,
"sPaginationType": "full_numbers"
});
oTable.columnFilter({
sPlaceHolder: "head:before",
aoColumns: [
{ sSelector: "#projectIdFilter" },
{ sSelector: "#projectNameFilter" },
{ sSelector: "#projectStatusFilter", type: "select" },
{ sSelector: "#projectModifiedFilter"},
{ sSelector: "#projectActionablesFilter" }
]
});
});
function resetFilters() {
var oTable = $('#projectTable').dataTable();
var oSettings = oTable.fnSettings();
for(iCol = 0; iCol < oSettings.aoPreSearchCols.length; iCol++) {
oSettings.aoPreSearchCols[iCol].sSearch = '';
}
oTable.fnDraw();
$('#filter_Name').val('');
$('#filter_Project_ID').val('');
$('#filter_Modified').val('');
$('#filter_Status').val('Status');
$('#filter_Actionables').val('');
}
</g:javascript>
my testdata covers 30 data rows and works just fine (filtering, clearing filters, etc...) the only issue is, that the pagination will not show up.
as you see:
- pagination is working in the background (
showing 1-1 of 30
) - First text is appearing, although not clickeable (as currently on first page)
i have tried a lot of different pagingType, bPaginate, bSort,... things but nothing seems to work.
Any ideas? issues with the underlying grails application?
Small addon issue/information: if i remove bSort: false
the pagination breaks completely and all projects are listed (1 through 30) on one page.