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

Cannot read property '_buttons' of undefined #408

Open
samsiddiquiz opened this issue Nov 30, 2018 · 1 comment
Open

Cannot read property '_buttons' of undefined #408

samsiddiquiz opened this issue Nov 30, 2018 · 1 comment

Comments

@samsiddiquiz
Copy link

All Buttons Working Fine, Except Excel Export ?Please Help.

image

library includes:

require.config({
                waitSeconds : 30,
                paths: {
                    "datatables.net": "../datatable/dataTables.min",
                     "dataTables": '../datatable/DataTables-1.10.18/js/jquery.dataTables.min',
                    "datatables.net-buttons": "../datatable/dataTables.buttons.min",
                    "datatables.net-html5": "../datatable/buttons.html5.min",
                    "datatables.net-print": "../datatable/buttons.print.min",
                    "datatables.net-Select": "../datatable/Select-1.2.6/js/dataTables.select.min",
                    "datatables.net-flash": "../datatable/Buttons-1.5.2/js/buttons.flash.min",
                    "datatables.net-jszip": "../datatable/JSZip-2.5.0/jszip.min",
                    "datatables.net-pdfmake": "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min",
                    //"datatables.net-pdfmake": "..datatable/pdfmake-0.1.36/pdfmake.min",
                    "datatables.net-vfs_fonts": "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts",
                    //"datatables.net-vfs_fonts": "../datatable/pdfmake-0.1.36/vfs_fonts",
                    'datetimepicker': '../Scripts/bootstrap-datetimepicker.min',
                    jquery: '../Script/js/jquery-3.3.1.min',
                    pnp: '../Script/pnp/pnpjs.es5.umd.bundle.min',
                    promise: '../Script/pnp/es6-promise.min',
                    fetch: '../Script/pnp/fetch',
                    polyfill: '../Scripts/polyfill.min',
                    RateCardDashboard: '../Scripts/RateCardDashboard',
                    bootstrapValidator: '../Scripts/bootstrapValidator',
                    dataTables: '../datatable/DataTables-1.10.18/js/jquery.dataTables.min',
                    bootstrapmin: '../Scripts/bootstrap.min',
                    jqueryconfirm: '../Content/jquery-confirm.min',
                    xlsx: '../Content/xlsx.full.min'
                },
                shim: {
                    'pnp': {
                        deps: ['promise', 'fetch', 'polyfill']
                    },
                    'RateCardDashboard': {
                        deps: ['pnp','bootstrapValidator']
                    },
                    "datatables.net": {
                        deps: ['jquery','jqueryconfirm', "bootstrapmin"]
                    }
                }
            });
            require(['xlsx',"dataTables", 'datatables.net-buttons',"datatables.net-flash", "datatables.net-jszip", "datatables.net-pdfmake", "datatables.net-vfs_fonts", "datatables.net-html5", 'datatables.net-print', "RateCardDashboard"], function (datatables, botton, html5, jszip, pdfmake) {
                    window.JSZip = jszip;
                    window.pdfmake = pdfmake;
                });

Datatable Initialize:

$('#RateCardGrid').DataTable({
                   orderCellsTop: true,
                   autoWidth: false,
                   fixedColumns: true,
                   dom: 'Bfltip',
                   "columnDefs": [{
                       "orderable": false,
                       "targets": [3, 11]
                   }, {
                       "targets": [12],
                       "visible": false,
                       "searchable": false
                   }, {
                       "targets": [13],
                       "visible": false,
                       "searchable": false
                   }
                   //    , {
                   //    "targets": [14],
                   //    "visible": false,
                   //    "searchable": false
                   //}
                       ]
                   //,
                   //"orderFixed": [0, 'asc']
               });
@DataTables
Copy link
Collaborator

Can you link to a test case showing the issue please.

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

1 participant