Datatable .makeeditable - POST to server after multiple cells edit

Datatable .makeeditable - POST to server after multiple cells edit

logeshwariramlogeshwariram Posts: 1Questions: 1Answers: 0
edited December 2015 in Free community support

This is my first project in JQuerry , and I'm using legacy Datatable plugin for editable. i.e i use .makeeditable for my usecase which is for commercial use case.

It's been awesome using Datatable. Now i have a use case where i want to inline edit set of cells, and then save them all together with a commit button. i have to POST to back end (C++) only when a user hits a commit button after he edited some x number of cells.

want to know how can we achieve this?

i have wrote code for doing inline editing as below and it works, but not sure how to work on the above use case (commit after multiple cells edit)

                      function populateShowConfig(items)
            {
            //alert('populate show config');
            alert(items);
            try
            {
            $(document).ready(function() {
                $('#tbl-results').dataTable( {
            "bProcessing": true,
            responsive: true,
                    "aaData": items,
                    "aoColumns": [
                            { "mDataProp": "name" },
                            { "mDataProp": "value" },
                            { "mDataProp": "description" }
                    ]
              }).makeEditable({

                    "aoColumns": [ null,

            {
            cssclass: "required",
            indicator: 'Saving...',
            tooltip: 'Click to edit',
            onblur: 'submit',

            },
            null
            ],
            "aoColumnDefs": [
            { "sClass": "readonly", "aTargets": [0] }

            ],
                    sUpdateURL: function(value, settings)
                    {
                    alert(value);
               $.ajax({
             dataType: "json",
                type: "POST",
                    data:{"value": value}
                })

                return value;
                    }
              });
              });
            } ```

It would be great if someone helps me in this. i went through new Datatable editor plugin as well, but since I'm using for commercial (work) purpose, i cannot use it as of now. Please suggest something with .makeeditable or whichever is legal to do with DataTable.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    MakeEditable is thirdparty software and not supported here. You could ask in that software's repo, but as far as I am aware it has long since been abandoned.

    Editor can be used for commercial work. It needs a license obviously, but it can absolutely be used in a commercial setting.

    Allan

This discussion has been closed.