Pagination is reset on autofill - Datatable issue
Pagination is reset on autofill - Datatable issue
Hi ,
I have an excel copy feature(autofill) in my data table. But One issue I am facing i.e. on autofill on nth page, it always refresh the pagination/table and scrolls up to the very first page. And pagination got refreshed " showing first 20 of totalCnt" as 20 is iDispalyLength(first page capacity)
What I need is after using autofill feature on any page I want to to stay in that page only and don't want my table to be refreshed and scroll up to first page.
PFB the test case for reference.
https://github.com/ssurajita/TestProjects/tree/master/AutoFillTest
Can anybody help me out to fix this issue. Any quick help appreciated.
Regards,
Soumya
This question has an accepted answers - jump to answer
Answers
Hi Allan,
Can you please suggest how to fix this issue. I have attached the test case as well.
Regards,
Soumya
I would suggest updating to use DataTables 1.10 which has the ability you are looking for, and AutoFill uses it.
Allan
Hi allan,
Thanks for your quick reply. I did that actually and the autofill issue is fixed after using the new data table (1.10)plugin. But now we are in a stage like changing this data table plugin is impacting a lot and it is breaking a few existing functionalities.
Any quick fix If you can suggest that would be really helpful.
Regards,
Soumya
Are you saying that upgrading to 1.10 is breaking things for you? It shouldn't be (unless you were using the deprecated fnRender or bScrollInfinite options).
Allan
Hi Allan,
I am still using the old data table plugin as pagination was breaking after adding new plugin. But however I have fixed the above issue after backtracking the function calls.
I have set and indicator(scrollTopInd=true) inside _fnWriteCell() in autoFill.js.
And in datatable.js inside _fnUpdate() checked the indicator value and called fnReDraw() accordingly.
if(!scrollTopInd){ //fnRedaw();}
Thanks for your support.
Soumya