Need multilevel tools in datatable.

Need multilevel tools in datatable.

Gobinda NandiGobinda Nandi Posts: 6Questions: 2Answers: 0

my current existing code

var productTblFixedHeader = function () {
    let prd_tbl = function () {
        let productTable = $('#prod-tab-id');
        window.confTable = productTable.DataTable({
            responsive: true,
            serverSide : true,
            processing : true,
            bStateSave: true,
            ajax : {
                url : "<?php echo site_url('catalogue/data');?>"
            },
            buttons: [ 
            {
                extend: 'collection',
                text: 'Action',
                buttons: [
                {
                    text: 'Add Product',    
                    action: function ( e, dt, node, config ) {
                        location.href = location.href + '/add';
                    }
                },
                {
                    text: 'Bulk Upload',    
                    action: function ( e, dt, node, config ) {
                        location.href = location.href + '/simple';
                    }
                },
                {
                    text: 'Grid View',  
                    action: function ( e, dt, node, config ) {
                        location.href = location.href + '/services';
                    }
                },
                {
                    text: 'Do Nothing',  
                    action: function ( e, dt, node, config ) {
                        bulkActionProductList(productTable)
                    }
                },
                ],
                className: 'btn default tbl-custom-dropdown', 
                fade: true
            },
            { extend: 'print', className: 'btn default' },
            { extend: 'pdf', className: 'btn default' },
            { extend: 'csv', className: 'btn default' },
            ],
            initComplete: function( settings, json ) {
                ComponentsContextMenu.init();
                product_list_module_permission;
            },
        });
    };          
    return {
        init: function () {
            if (!jQuery().dataTable) {
                return;
            };
            prd_tbl();
        }
    };
}();

i need a level at "do nothing" option. Help is appreciated.

Answers

  • colincolin Posts: 8,013Questions: 0Answers: 1,348

    Hi @Gobinda Nandi ,

    The closest to that is multi-level collections. There is a bug open for them, as the behaviour isn't quite right, but that'll give you an idea of when they do.

    Cheers,

    Colin

  • Gobinda NandiGobinda Nandi Posts: 6Questions: 2Answers: 0

    @colin thanks for the reply but my requirement doesn't match with it. still unable to find anything.

    Peace

Sign In or Register to comment.