private void SelectNextResult() { if (ResultDataGridView.Rows.Count > 0) { int selectedIndex = ResultDataGridView.SelectedRows[0].Index; if (selectedIndex < ResultDataGridView.Rows.Count - 1) { ResultDataGridView.ClearSelection(); ResultDataGridView.Rows[selectedIndex + 1].Selected = true; } } }
private int SelectPreviousResult() { int selectedIndex; if (ResultDataGridView.SelectedRows.Count > 0) { selectedIndex = ResultDataGridView.SelectedRows[0].Index; } else { selectedIndex = 0; } if (selectedIndex > 0) { ResultDataGridView.ClearSelection(); ResultDataGridView.Rows[selectedIndex - 1].Selected = true; } return(selectedIndex); }
private void RefreshButton_Click(object sender, EventArgs e) { LoadBidValues(); ResultDataGridView.Focus(); }