Export buttons

Export buttons

luke_jrluke_jr Posts: 4Questions: 2Answers: 0
edited February 2015 in Free community support

Hi,

I am having problems getting the export buttons to appear.

I am currently populations an asp:gridview dynamically through the click of a "run" button.

I have bound the call of DataTable() to an event on a second button click as follows

``$("#gridview").on("click", function (e) {

            e.preventDefault();
            $(".gridview_class").DataTable({
                dom: 'T<"clear">lfrtip',
                "tableTools": {
                    "sSwfPath": "/swf/copy_csv_xls_pdf.swf",
                    "aButtons": [
                        "copy"
                        "print",
                        {
                           "sExtends": "collection",
                           "sButtonText": "Save",
                            "aButtons": ["csv", "xls", "pdf"]
                        }
                  ]


               }
            });``

The styling of the table changes so I am sure that the plugin is firing but there are no buttons appearing and now the search bar doesn't appear either (with some tinkering I can make the search bar work).

I have included
jQuery, jquery.dataTables.js, TableTools.js

I have looked around the internet but I don't seem to be able to find a solution which helps me.

Can anyone give me some advice or point me in the right direction?

Many thanks,

Luke

Answers

  • luke_jrluke_jr Posts: 4Questions: 2Answers: 0

    Also, how do I format this correctly. It looks readable in preview!

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    how do I format this correctly

    One pair of "backticks", enclosing all your code.

    three backticks *all your code* three backticks

  • luke_jrluke_jr Posts: 4Questions: 2Answers: 0

    Thank you

This discussion has been closed.