private void DeleteFocusedRows(DevExpress.XtraGrid.Views.Grid.GridView view) { if (view.RowCount > 0 && view.IsValidRowHandle(view.FocusedRowHandle) && !view.IsNewItemRow(view.FocusedRowHandle)) { view.BeginSort(); try { view.DeleteRow(view.FocusedRowHandle); } catch (Exception) { } view.EndSort(); } }