How can I display a table from one service and edit from a different service

How can I display a table from one service and edit from a different service

alfredobobadillahalfredobobadillah Posts: 2Questions: 1Answers: 0

I have a service for the datatables object
$('#example').DataTable(
{
ajax:"/api/my_view"});

this service is connect to postgres view

but i need connect edit object whit a different service

editor = new $.fn.dataTable.Editor( {
ajax: {
url: "/api/my_table"}});

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    Yep, that's entirely possible - as the DataTables end-point just deals with the display. Are you experiencing problems doing this?

    Colin

  • alfredobobadillahalfredobobadillah Posts: 2Questions: 1Answers: 0

    Thanks colin !

    When I open the edit modal window the fields are empty, I could not find an example in which I can synchronize the data of the two services

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    edited November 2020

    For what you describe your server-side API would need to implement the client / server communication the Editor uses. We provide libraries for PHP, NodeJS and .NET to provide that functionality and write data back to a database.

    edit I forgot to address the point about the data not being shown in the Editor modal. Can you show me your full Javascript configuration please?

    Allan

This discussion has been closed.