fnDraw does not alter the start index.
fnDraw does not alter the start index.
Hi
I am using Jquery datatable and I should say its absolutely a marvellous piece of work! But I need help in one issue I am facing:
When I try to reload the table after paginating to say 2nd or 3rd page, the info at the bottom is wrong.
I am not using the search feature of datatable, but instead I have my own search that just refreshes the table calling ajax and redraws by calling fnDraw(true)
The problem is, when I have navigated to 2nd page (And I have 10 entries per page), the info below says "Showing 11 to 20 of 1499 entries"
At this point, when I search, and lets say I have 2 results, the table gets redrawn but the info message says "Showing 11 to 2 of 2 entries"
Please help me where I am going wrong!
Thanks in advance.
I am using Jquery datatable and I should say its absolutely a marvellous piece of work! But I need help in one issue I am facing:
When I try to reload the table after paginating to say 2nd or 3rd page, the info at the bottom is wrong.
I am not using the search feature of datatable, but instead I have my own search that just refreshes the table calling ajax and redraws by calling fnDraw(true)
The problem is, when I have navigated to 2nd page (And I have 10 entries per page), the info below says "Showing 11 to 20 of 1499 entries"
At this point, when I search, and lets say I have 2 results, the table gets redrawn but the info message says "Showing 11 to 2 of 2 entries"
Please help me where I am going wrong!
Thanks in advance.
This discussion has been closed.
Replies
Just did this whenever I search
var otable = $(element).dataTable();
otable.fnSettings()._iDisplayStart = 0;