To reproduce:
public Form1()
{
InitializeComponent();
this.radGridView1.Columns.Add("Name");
this.radGridView1.Columns.Add("ID");
this.radGridView1.RowsChanged += radGridView1_RowsChanged;
}
private void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e)
{
Console.WriteLine(e.Action);
if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Add)
{
GridViewRowInfo row = e.NewItems[0] as GridViewRowInfo;
row.Cells["ID"].Value = this.radGridView1.Rows.Count;
}
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radGridView1.Rows.Add("Item" + this.radGridView1.Rows.Count);
}
Note: the first firing of the RowsChanged event used to be with Action=Add.