datatables.net/examples/api/form.html

datatables.net/examples/api/form.html

estudiosestudios Posts: 52Questions: 0Answers: 0
edited April 2014 in General
I am trying to learn how to update data in the MySQL database using the example http://datatables.net/examples/api/form.html.
I have all working, identical as the example but I do not know how to update the records in the table.

Thanks

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Hi,

    You need something on the server-side that will accept the submitted data and save it to the database. Exactly how you do that will depend heavily upon your server-side environment. Are you using PHP, .NET, Node, Rails, etc?

    If you are using PHP, you might fancy taking a little look at Editor (I see you already have a license - so this might be an ideal option) which has prebuilt libraries all ready to be used and accept the edited data from the client-side - https://editor.datatables.net .

    Regards,
    Allan
  • estudiosestudios Posts: 52Questions: 0Answers: 0
    Thanks allan, I do use Editor and have the New, Edit, Delete buttons, all works very good, Now I add a new column with a check box like this:
    "aoColumns": [
    all other...},
    { "mData": "contabilizado", "mRender": function (data, type, full ) { if (data == 1)
    {
    return '';
    } else{
    return '';
    }
    }
    }
    ],
    I wonder how to send the clicked (or unclicked) field to update de table. Of course I can do it with the standard Edit button but that makes me go through the standard form that appears. I just want to check a number of rows and with one click update the table.

    Thanks a lot
This discussion has been closed.