Get current page

Get current page

d7a7z7e7dd7a7z7e7d Posts: 8Questions: 0Answers: 0
edited March 2011 in General
Is there a way to get the current page?

I'm trying to update the pipelining cache when I'm using jeditable but the problem is that I only have a row and column index for the current page I'm on. So, if I'm on page two, I need to reference the correct index in the pipelining cache (i.e. page * row), otherwise it will always just update the first page in the cache.

Thanks!

Replies

  • d7a7z7e7dd7a7z7e7d Posts: 8Questions: 0Answers: 0
    Nevermind, I tried a few more forum searches and found it...

    var page = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1;

    Sorry!
  • pfgpfg Posts: 5Questions: 0Answers: 0
    And how to change to a specific page?
  • pfgpfg Posts: 5Questions: 0Answers: 0
    I discovered:

    [code]

    var oTable = $('#tableDetails').dataTable();
    var oSettings = oTable.fnSettings();

    oSettings._iDisplayStart = 11; //for example is 3rd page if page size is 5

    oTable.fnDraw(true);

    [/code]
This discussion has been closed.