Editor Buttons Not Showing

Editor Buttons Not Showing

Ali AdnanAli Adnan Posts: 47Questions: 18Answers: 1

Dear Allan,

if I use this markup the editor button works perfectly

var otable = $('#dt_Table').DataTable({
                dom: 'Bfrtip',
                ajax: {
                    url: '/api/Controllers/Methods',
                    type: 'POST'
                },
                columns: [
                    { data: "_id" },
                    { data: "_code" }
                ],
                select: true,
                buttons: [
                    { extend: "create", editor: editor },
                    { extend: "edit", editor: editor },
                    { extend: "remove", editor: editor }
                ]
            });

but if I use

"sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6 hidden-xs'f><'col-sm-6 col-xs-12 hidden-xs'<'toolbar'>>r>" +
                        "t" +
                        "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",

instead of

dom: 'Bfrtip',

The Editor button not show,

Can you please help me on this ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin
    Answer ✓

    Each letter in the dom property (unless it is in quotes) is a feature. In this case, you are missing the B option which tells DataTables where to put the Buttons.

    Allan

  • Ali AdnanAli Adnan Posts: 47Questions: 18Answers: 1

    Thanks it solved my problem

This discussion has been closed.