i am using VS2005 (c#.net desktop application). when i am adding eventHandler to a combo of datagridview, its automatically adding same eventhandler to all other combos of same datagridview..
my code:
private void dgvtstestdetail_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
DataGridView grid = (sender as DataGridView);
if (grid.CurrentCell.OwningColumn == grid.Columns["gdvtstd_TestParameter"])
{
ComboBox cb = (e.Control as ComboBox);
cb.SelectedIndexChanged -= new EventHandler(dvgCombo_SelectedIndexChanged);
cb.SelectedIndexChanged += new EventHandler(dvgCombo_SelectedIndexChanged);
}
}
i want to add differnt event handelrs to differnt combos in datagridview. please tell me how can i do it..