Submitting a whole table

Submitting a whole table

jmccolgan93jmccolgan93 Posts: 7Questions: 5Answers: 0

TLDR: can I submit a whole table to an ajax call.

hey guys, so I'm working on a web app where someone can upload an excel sheet, my backend does some processing and then creates a data table based on the formatted JSON from the excel sheet... I got all that working just fine.

I still haven't submitted any data to the database yet because I want to give the user one last chance to edit/rearrange the table.

so is it possible to have a button at the top of the table that submits the whole table with AJAX?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Yep, you can use the Buttons to create the button, and a call to rows().data() will get all the data, probably with rows().data().toArray() which you can then send to your server.

    It might also be worth looking at Editor, as that editing and connection to the server is built-in, and it can easily to file upload.

    Colin

  • jmccolgan93jmccolgan93 Posts: 7Questions: 5Answers: 0

    i will give the rows().data() a shot. sadly the file upload doesn't really work for me in this instance.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Editor supports file uploading, please see example here, so it would definitely be worth considering that as a solution,

    Colin

Sign In or Register to comment.