If e.RowIndex >= 0 Then Dim row As DataGridViewRow Dim amount, qty, prod As Double row = Me.DataGridView1.Rows(e.RowIndex) amount = row.Cells("Price").Value.ToString qty = row.Cells("Qty").Value.ToString prod = amount * qty kg.Text = prod End If
Protected Sub btnSave_Click(sender as Object, e as EventArgs) For Each grv as DataGridViewRow in DataGridView1.Rows If grv.Cells("checkboxcolumnname").Checked ' your save code End If Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)