How Post Added Rows to MVC Controller?
How Post Added Rows to MVC Controller?
james.igoe
Posts: 2Questions: 1Answers: 0
I am looking to pass DataTable data back to an MVC controller. For the initial page, I pass a model into the view with some defaults. I allow the user to add rows to the data table that is part of the model. When the user clicks update, the data is sent back to the controller. How can I get the new, added rows from the view?
This discussion has been closed.
Answers
I think this might be the answer to my own question:
https://datatables.net/examples/api/form.html
Hi @james.igoe ,
That example is more for when the table has input elements in, rather than adding rows as a whole. This thread here may help, it's shows how you can use
rows().data()
withJSON.stringify
to send the data back,Cheers,
Colin