Sorting without reset iDisplayStart.

Sorting without reset iDisplayStart.

gunjungzgunjungz Posts: 1Questions: 0Answers: 0
edited December 2013 in General
Hello,

I got a problem when I click header to sorting column. It will reset iDisplayStart to 0.

Example
I click sort on page 2 (iDisplayStart = 10) then iDisplayStart reset to 0.

How I set iDisplayStart to current page.

[code]oTable = $('#example').dataTable({
"bJQueryUI" : true,
"bServerSide":true,
"bProcessing": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "paramSearch",
"bStateSave": true,
"bLengthChange": true,
"aoColumns": [
{ "mDataProp": 'name'},
{ "mDataProp": 'value'}
],

});
[/code]

Thanks.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Currently no - if the user sorts, then they are always taken the the first page so they know where they are, otherwise they would "randomly" be in the middle of a data set (not really random at all, but none-the-less they wouldn't have any other reference point!).

    It actually is possible to do this with the new API in 1.10, but you would need to implement the click to sort listener yourself and use the new `draw()` method which allows a standing redraw to occur. I'm still working on the documentation for 1.10 though...!

    Allan
This discussion has been closed.