Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexing to the row data mismatch when exporting table to pdf. #438

Open
sathyaprakash94 opened this issue Apr 30, 2019 · 1 comment
Open

Comments

@sathyaprakash94
Copy link

Indexing to row data is mismatch when exporting PDF. Im facing this problem only using pagination, without pagination with all data filter its working fine.
But when comes with pagination each page row index are mismatching, indexing incorrectly assigning to the rows. I have tried the following code to render the row data and the indexing.

"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { var index = iDisplayIndexFull + 1; $('td:first', nRow).html(index); return nRow; },

nRow returning the records only in the view of pagination, if i move on to the 10th or 15th page the data inside the first page pagination view changed like no 11, 12, 13 instead of displaying 1,2,3 like that randomly it is changed with another indexing nos.

I attached the snapshot of the problem herewith for better understanding. I have tried most of scripts said in the DataTable but not works. The 1st page with indexing are incorrectly mapped when switching between the pages in the pagination.

dataTblIssue1
dataTblIssue2

@romanstingler
Copy link

do you have a LIMIT and an ORDER BY in your query, these are non-deterministic unless you add an additional deterministic sort field like an id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants