Datatable save-Update URL change?

Hello, another question :) I can not get an ID attached :(

view:"datatable", columns:[ { id:"id", header:"ID", sort:"text", width:50 }, { id:"cat_id", header:"Category ID", sort:"text" } ], editable:true, save:{ "insert":"data/insert.php", "update":"data/update.php?id"+this.getSelectedId(), "delete":"data/delete.php" }

After initialization, this.getSelectedId () is static :(

best regards


  • You need to have view:"datatable", select:true to enable selection in the datatable.

    Please beware that selected cell and edited cells can differ ( currently edited cell can be retrieved through

    var state = this.getEditState();
    if (state){
       const col = state.column;
       const row = state.row;
  • Also, for update calls, the ID of affected row will be available as part of POST request ( you can use $_POST["id"] to get the id of the row )

    If you need to change how the parameters transferred to the server, you can define your own data proxy.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion