I have a DataGridViewComboxColum named “cbxActionType” on my windows form application which have the following values in its item collection. • For Information • For Comment • For Review … etc. DataGridView1 has a column named “NDays” which stores numbers of days. How do I set the NDays column value to 0 (zero days) if the “cbxActionType” selected value is changed to “For Information”?
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.CurrentRow.Cells["cbxActionType"].Value == "For Information")
{
dataGridView1.CurrentRow.Cells["NDays"].Value = 0;
}
}