How to code function for button of datatables

How to code function for button of datatables

thanhdothanhdo Posts: 6Questions: 3Answers: 0
edited September 2020 in Free community support

Hello everyone,
I'm newbie. I want to program the following function:
When user click row -> click button "Edit" -> Show modal & load data form MySql (PHP) -> user fill data -> save to MySql.
This is my datatable

var dataTable=$('#table').DataTable({
                "processing": true,
                "serverSide":true,
                "ajax":{
                    url:"fetch.php",
                    type:"post"
                },
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print','edit'
                ]
                  
            
            });

Please guide me.
Thank you!

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

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

    Use DT's Editor. It's not reasonable to expect someone to write such a complex function for you for free.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yep, as tangerine said, that's what Editor does - so it would be worth looking at that and seeing if that would fulfil your needs,

    Colin

This discussion has been closed.