fnDraw does not alter the start index.

fnDraw does not alter the start index.

SangeethaSangeetha Posts: 3Questions: 0Answers: 0
edited June 2012 in General
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.

Replies

  • SangeethaSangeetha Posts: 3Questions: 0Answers: 0
    Please can anyone respond to this. I am badly waiting for response.
  • SangeethaSangeetha Posts: 3Questions: 0Answers: 0
    I got the answer myself. Posting here so that it would be helpful for others.
    Just did this whenever I search
    var otable = $(element).dataTable();
    otable.fnSettings()._iDisplayStart = 0;
This discussion has been closed.