Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2367

Custom button form message

$
0
0

Description of problem:
I have a custom button "Delete All" which deletes all selected rows based on search. Before delete function, I want to display a form message warning the user about the delete all. I am unable to show the form message though I have the details.

{
                text: '<i class="fa fa-trash"></i> Delete all',
                className: 'btn btn-danger btn-editor-remove',
                
                formMessage: function ( e, dt ) {
                    return 'Do you want to delete all selected rows?';
                },
                action: function () {
                   
                        table.ajax.url("/xxxxxxxx?contentType=application/json");
                        table.page(0);
                        table.ajax.reload();
                        // set the URL back to the normal browsing call
                        table.ajax.url("/xxxxxxxxxxxxx?contentType=application/json");
                    
                }
            }

Also there is already and single row delete button on the table. I could use the simple javascript confirm dialog, but it looks quite different from form message. Please help.


Viewing all articles
Browse latest Browse all 2367