To reproduce:
public Form1()
{
InitializeComponent();
GridViewComboBoxColumn comboCol = new GridViewComboBoxColumn();
comboCol.DataSource = InitComboActive();
comboCol.ValueMember = "ActiveCode";
comboCol.DisplayMember = "ActiveDsc";
comboCol.FieldName = "ActiveCode";
this.radGridView1.Columns.Add(comboCol);
this.radGridView1.AutoGenerateColumns = false;
BindRadGrid();
this.radGridView1.CellValueChanged += radGridView1_CellValueChanged;
}
private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
BindRadGrid();
}
private void BindRadGrid()
{
this.radGridView1.DataSource = null;
this.radGridView1.DataSource = InitComboData();
}
private DataTable InitComboActive()
{
DataTable dt = new DataTable("DtActive");
dt.Columns.Add("ActiveCode");
dt.Columns.Add("ActiveDsc");
dt.Rows.Add("0", "InActive");
dt.Rows.Add("1", "Active");
return dt;
}
private DataTable InitComboData()
{
DataTable dt = new DataTable("DtData");
dt.Columns.Add("Host");
dt.Columns.Add("ActiveCode");
dt.Columns.Add("ActiveDsc");
dt.Rows.Add("Host A", "0", "InActive");
dt.Rows.Add("Host B", "1", "Active");
return dt;
}
Workaround: use the RadGridView.CellEndEdit instead for rebinding.
Workaround 2: use the CellValidated event:
private void radGridView1_CellValidated(object sender, CellValidatedEventArgs e)
{
if (e.Row is GridViewDataRowInfo)
{
BindRadGrid();
}
}