There is a WPF application where the DataGrid selects data from the Mysql database. Is it possible to send to the database a newly added row (entirely) from the DataGrid a? I found the roweditending property — great, but I don’t understand how to transfer the data from the Grid a fields to the database fields.

ps For example, similar is implemented in HeidiSQL, but only by cell. Help to understand, thanks!

  • Please see how your text is formatted. You accidentally put the two service characters somewhat wrong. - Pavel Mayorov

1 answer 1

Personally, I would do the following:

  1. I would connect PetaPoco to interact with the database (not necessarily, but it's easier)
  2. Created a list of the necessary elements (for example, Article) and would connect as a DataSource to DataGrid View
  3. On roweditending, I updated the desired item through PetaPoco simply by saving the desired item. :)

To vskidku these actions should be enough.