Drop down selected only
Drop down selected only
sandro33
Posts: 5Questions: 2Answers: 0
Hi,
i have a mysql/php table with drop down select.
I want to export the table in csv but when i do it all options of my drop downs select appear. i just want the option "selected" in the export.
How it's possible ?
Thanks
Sandro
This discussion has been closed.
Answers
You would need to provide a custom formatting function like in this example.
The problem is caused by the fact that the export uses
$().text()
to get the data to export, so it basically just strips the HTML. In your case you'd need to provide a function that will get the text value of the selectedoption
element only.Allan
when drop down on change , data table is appearing but when page refresh it display all data how to save drop down selected value
You could use DataTables state saving options.
stateSaveParams
andstateLoadParams
are probably the two options you want to look into.Allan