How do I export a selected item?

How do I export a selected item?

Anurag JainAnurag Jain Posts: 6Questions: 3Answers: 0

I have a dropdown in one of my columns that displays a selected item depending on data received from my database. When I try to export the table as a PDF or any other means, all of my dropdown options are shown in that column in the exported document. How do I show only the dropdown item that is already selected?

I'm guessing I have to make use of the Customize option which isn't really covered in the DataTables documentation but I can't find where on the pdfmake.org site this is explained. An example would be really helpful as I've somehow managed to make it this far with very little jQuery/Ajax knowledge.

Thank you!

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,095 Site admin

    Do you mean that you have a select element in the table itself? That isn't something that is directly supported at this time for the export. What you need to do is use custom formatter whereby you will query the DOM for the select to get the selected item's value or label (depending on what you want to export).

    Allan

  • Anurag JainAnurag Jain Posts: 6Questions: 3Answers: 0

    when Capture image status drop down list value export in pdf using j query data table function then capture2 image display all drop down list value.
    but i want to show or display only selected value in drop down list on export to pdf function

  • Anurag JainAnurag Jain Posts: 6Questions: 3Answers: 0

    Hi @allan ,
    when Capture image status drop down list value export in pdf using j query data table function then capture2 image display all drop down list value.
    but i want to show or display only selected value in drop down list on export to pdf function.
    Anurag Jain

This discussion has been closed.