To reproduce:
DataTable table;
public RadForm1()
{
InitializeComponent();
table = GetTable();
radGridView1.DataSource = table;
}
private void radButton1_Click(object sender, EventArgs e)
{
var changes = table.GetChanges();
if (changes == null)
{
Console.WriteLine("No Changes");
}
else
{
Console.WriteLine("Saved");
foreach (DataRow item in changes.Rows)
{
Console.WriteLine(item.RowState.ToString());
}
}
table.AcceptChanges();
}
static DataTable GetTable()
{
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("Drug", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Date", typeof(DateTime));
table.Rows.Add(25, "Indocin", "David", DateTime.Now);
table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
table.AcceptChanges();
return table;
}
Workaround:
(this.radGridView1.CurrentRow.DataBoundItem as IEditableObject).EndEdit();