Generation

generate functionFri, 30 Jun 2023

restar dos textbox del datagridview

private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 2 || e.ColumnIndex == 3) { int rowIndex = e.RowIndex; DataGridViewRow row = dataGridView1.Rows[rowIndex]; int a = Convert.ToInt32(row.Cells[2].Value); int b = Convert.ToInt32(row.Cells[3].Value); row.Cells[4].Value = a + b; } }

Want to kickstart your project?Use the new AI Studio to create your code