I have a XtraGrid binded to an objectset; after to have added several rows, not matter
how many, always that i press <Esc> (twice), WITH THE FOCUS in the NewInitRow
(FocusedRowHandle < 0), at the second time of pressing <Esc> the last
row recently added (row=rowcount-1) is deleted. After debugging, i found
the line of code problem:
private void advBandViewRGD_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape && advBandViewRGD.ActiveEditor == null)
{
//THE FOLLOWING LINE IS GUILTY:
advBandViewRGD.CancelUpdateCurrentRow();
advBandViewRGD.FocusedRowHandle = prevRowHandle;
}
......
}
Why occurs this? Which is the solution?
Thanks in advance