private void DeleteSelectRows(GridView gridView) { if (gridView.SelectedRowsCount == 0) return; int bfFocus = gridView.GetSelectedRows()[0]; if (xtraTabControlPhanQuyen.SelectedTabPage == xtraTabPageTaiNguyen) { MSXoaTaiNguyen(gridView.SelectedRowsCount); } else { MSXoaNhomTaiNguyen(gridView.SelectedRowsCount); } gridView.DeleteSelectedRows(); if (gridView.RowCount > 0) { if (gridView.GetNextVisibleRow(bfFocus) < 0 && gridView.GetPrevVisibleRow(bfFocus) >= 0) { bfFocus--; } gridView.SelectRow(bfFocus); gridView.FocusedRowHandle = bfFocus; } ((DataTable)gridView.GridControl.DataSource).AcceptChanges(); }