Pagination is reset when using a jEditable
Pagination is reset when using a jEditable
jocapc
Posts: 45Questions: 0Answers: 0
I think I found a problem with a DataTables when used with a JEditable plugin.
1. Go to the http://www.datatables.net/examples/api/editable.html
2. Navigate to the second or third page using navigationbutton below the table
3. Edit any cell and press ENTER
Pagination is reset and first page is shown again, so I need to navigate back to the page/cell I edited.
Is this a bug or it is possible to prevent resseting page number to the first page?
1. Go to the http://www.datatables.net/examples/api/editable.html
2. Navigate to the second or third page using navigationbutton below the table
3. Edit any cell and press ENTER
Pagination is reset and first page is shown again, so I need to navigate back to the page/cell I edited.
Is this a bug or it is possible to prevent resseting page number to the first page?
This discussion has been closed.
Replies
Allan
This is not an issue I noticed - edit event works fine on all pages.
Problem is that when I edit a cell on the third page, and press ENTER, table is refreshed but positioned on the first page instead of the third page where I updated the cell.
Editing works fine on all pages, and cell is updated, only problem is that user needs to use pagination to return back to the page he edited. This might be annoying if he edited 10th page and then need to return back to the page after DataTables refreshed the view to the first page.
You can try this on your demo page http://www.datatables.net/examples/api/editable.html - just go to the third page, update any cell and table will be refreshed but positioned on the first page. Is there any way to keep the current page?
Thanks,
Jovan
Allan
I have impelemented code similar to the fnStandingRedraw and it works fine now.
for people having the same problem and work with the additional plugin
jquery-datatables-editable (http://code.google.com/p/jquery-datatables-editable/).
In the file jquery.dataTables.editable.js you can find the fnUpdate command in the function _fnApplyEditable. Add on both a false parameter and deactivate the invokement of _fnSetDisplayStart(); at the end of the callback funtion and it works as described by allan.
Thank you very much allan for the provided solution it worked perfectly for me!
It seems to be a fixed (?) bug of the jquery-datatables-editable plugin as described here: http://code.google.com/p/jquery-datatables-editable/issues/detail?id=2