Would it be possible to provide an example for datagridview, with 3 columns, and in the 3rd column i’m going to have a decimal value, that i want to edit directly on the grid.
If there’s a “afteredit” or such event, there i want to execute some sql to update the database,
Thanks in advanced,
There are several ways to do that. Depends on how you populate the grid, is it data bound, is it virtual, etc. If it’s data bound, the value goes to the data source automatically, and if the datasource is connected to the database it also goes there automatically. Works exactly like the WinForms DataGridView (https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/how-to-bind-data-to-the-windows-forms-datagridview-control plus a ton of other sources).
If you are handling the data yourself, you can use CellValueChanged (fires also if you change the value by code), or CellEndEdit events.
If you send a sample project with comments on what you need to do, we can insert the sample code there.
Check out also the CodeProject sample (simple data binding) or the EF data binding sample using Entity Framework https://wisej.com/examples/ (click on the GitHub link)