I need pass to data row in DRUD

I need pass to data row in DRUD

rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2
edited January 2015 in Editor

pass the data content of the row to url defined in Drud .

Following the example https://editor.datatables.net/examples/advanced/REST.html

But no need to use PK pass the contents of all variables in the table but not how to pass the contents of the table to the url . for example:

$(document).ready(function() {
    editor = new $.fn.dataTable.Editor( {
        ajax: {
            remove: {
                type: 'DELETE',
                url:  '../php/rest/remove.php?campo1=ID_ASEGURADORA&campo2=ID_CAMPO'...  
            }
        },

....

columns: [
            { data: "ID_ASEGURADORA", visible:false},
            { data: "ID_CAMPO", visible:false},
            { data: "VAL_CAMPO"},  //la ptabla origen html debe estar definida asi como su tablas, 
            { data: "SECUENCIA", visible:false},          //Las lineas title reescriben el nombre de las columnas a mostrarse
            { data: "DESC_VALOR",}, 
                    ],  

as I pass all variables a row to ulr url: ' ../php/rest/remove.php

Answers

  • allanallan Posts: 63,364Questions: 1Answers: 10,449 Site admin

    but not how to pass the contents of the table to the url

    I'm afraid I don't understand. The table contents should already not be passed to the url. Only the primary key value should be sent since that is all the server needs to be able to delete the rows.

    Allan

  • rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2

    my question is .
    Can I pass other values ​​in the table by the url or just the id ?

  • allanallan Posts: 63,364Questions: 1Answers: 10,449 Site admin

    I see - thanks for the clarification. On delete only the ID is sent. You would need to use preSubmit to send additional information if you require it.

    Allan

This discussion has been closed.