There is an application with a table written in c # MVC. In the standard table implementation, it is allowed to edit, delete and update records line by line.

It is necessary to store the changes on the table, and apply them by pressing a single "save" button located on the table. Maybe there are some ready-made solutions about this?

While working version to save all changes to local storage on JavaScript / jQuery. And on the button to hang up processing of arrays of saved changes.

  • What does not suit the current version and what are you trying to achieve? - Vadim Prokopchuk
  • I want to allow the user to edit all the data, look at what happens, think and "save." - Valery Sushkevich
  • That is, you want the draft to be stored locally, and after clicking a button, the data is sent to the server? - eastwing
  • That's right - Valery Sushkevich

1 answer 1

You can make it easier without local storage and an array of changes to save.

  1. Option with MVC . You must use a strongly typed view and you can display a table in foreach, and input to associate with the fields of the model. Then when you change the value in input, the model changes and you can just save it. Read here an example.

  2. Option with angular js . Connect to the angular project. And make a table in ng-repeat.

Angulyar himself monitors the change in the model. Those. if you change everything in view, it will immediately be available in the controller. An example of a table with editing - http://jsfiddle.net/ NfPcH / 93 /

  • option with angular unfortunately disappears, because already jQuery is used in the project. - Valery Sushkevich