Topic: updating editable datatable from database failed

atinbop free asked 4 years ago

Does somebody have the JS and C# code to load Editable table and to save data in the database? please i need help i have try to pass json serialise data from the server to to the JS to update the JS variable named dataset in Bubble Editor template. But its not working.

Aliaksandr Andrasiuk staff answered 4 years ago


Can you show the code you are using for the changing dataset variable?

After successfully received data from the server it's enough to update the body of your table, f.e:

        //Basic setup

       // saving your datatable to the variable
        let dataTable = $('#dtBasicExample');
        //saving datatable's body to the variable
        let dataTableBody = dataTable[0].childNodes[3];

        //After receiving data from the server 
        //you should process the data to the similar look 
        let updatedBody = `<tr>
          <td>Tiger Nixon</td>
          <td>System Architect</td>
          <td>Garrett Winters</td>

         //sets the received and processed data as a body 
        const setNewBody = body => (dataTableBody.innerHTML = body);

          .then(response => response.json())
          .then(() => setNewBody(updatedBody));

         //the code above should be replaced with:
         //then(data => processData(data))
         //then(res => setNewBody(res))


Hope I could help.

Best regards.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.5
  • Device: PC
  • Browser: Opera
  • OS: Windows
  • Provided sample code: No
  • Provided link: No