After filling DataSet
, I insert two DataGridViewComboBoxColumns
into some particular index:
dgvPayments.Columns.Insert(1, cmbPayMethod);
dgvPayments.Columns.Insert(3, cmbPayType);
dgvPayments.Columns.Insert(5, cmbMonth);
I have a cell click event in this DataGridView
where I check against the index:
if (e.ColumnIndex == 6)
{
...
}
The first time I load the data the column index hits the correct column, but after clearing data the column index does not. What is wrong?