Used following guideline for performing Multiple or Add operations on DGV's individual cells to generate Auto-Calculated values for any other Cell in DGV
If you Really want to do programming by Heart...You can transform following steps into your Code Sytle...
Put following code into DGV's
if (e.RowIndex > -1)
if (DGV.Rows[e.RowIndex].Cells.FormattedValue.ToString() != "")
if (e.ColumnIndex == 1 || e.ColumnIndex == 2)
(decimal)(Cells.value) * (decimal)(Cells.value);
//Now to Calculate Sum of Each Column's Values...
//you can use following code snippet
<pre lang="cs">decimal total = 0;
for (int i = 0; i < rows; i++)
total += decimal)(DGV.Rows[i].Cells.Value);
Note :- This is just Guideline and I know it's working I used it in my one of project. Here I just give a major points that you are looking for...
And The Code for Saving these DATA into database you should have to Try it by yourself.. I think you are very familiar with saving / retrieving data from Database.