private static int GetGroupRowCount(DevExpress.XtraGrid.Views.Grid.GridView view) { for (int i = -1; i >= int.MinValue; i--) { if (!view.IsValidRowHandle(i)) { return(-(i + 1)); } } return(0); }
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(); } }