The code below is what I did to partially solve this problem. DataAccess.DeleteRow is a method that deletes the row from the database and the dataset that is bound to the grid.
I thinki that if Inragistics spent more time making their existing code do what it should do, instead of adding features, we wouldn't need hacks like this.
void M3EditableGrid_BeforeRowsDeleted(object sender, BeforeRowsDeletedEventArgs e)
{
UltraGridRow[ rows = e.Rows;
if (rows.Length > 0 && RemoveButton != null)
foreach (UltraGridRow row in rows)
if (row.HasPrevSibling())
_previousRow = row.GetSibling(SiblingRow.Previous);
else
_previousRow = row.ParentRow;
DataAccess.DeleteRow(row, (DataSet)this.DataSource);
}
e.Cancel = true;
void M3EditableGrid_AfterRowsDeleted(object sender, EventArgs e)
if (_previousRow != null)
_previousRow.Activate();
UpdateButtons(); ;
this.Focus();