Print / Copy / Excel doesn't print 'selected' option value
Print / Copy / Excel doesn't print 'selected' option value
I am trying to print or copy a table which has 8 columns. I am having 2 issues
1. I am only able to print 7 of them the 8th one goes outside the page. If I reduce the size it becomes very small
2. The very last column is for status (select) and when I print it I see all 4 status being printed instead of just the selected value. NOTE: This selected class doesn't have the same name example <select name="status-2" id="status-2" class="status-select"> I add value ""id to each one of the row to get the option value from DB. You can take a look at **screenshot **for reference
Answers
See if this thread helps.
Kevin
Hi Kevin no this thread different I have the values inside a row and I want to print the value of that select that's it. I am not trying to filter or anything else
Take a look at Colin's example from that thread:
http://live.datatables.net/kajugomo/1/edit
For this comment:
Basically he is showing how to use jQuery to get the value of the input in the cell. Also see this example explaining exporting with orthogonal data.
If you still need help please provide a running test case, or update Colin's, showing an example of your cells with the select inputs.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Here is the link http://live.datatables.net/yorohoxe/1/edit
It looks like you haven't applied the code that Kevin pointed you towards. Take a look at his last reply, that will solve it for you,
Colin
that code sorts the value I am trying to read the .value of select ID