private void moveUpButton_Click(object sender, EventArgs e) { if (wordsDataGridView.RowCount == 0) { return; } DGVManipulation.MoveDGVRowUp(wordsDataGridView); int rowIndex = wordsDataGridView.SelectedCells[0].OwningRow.Index; moveUpItem(wordsList, rowIndex); moveUpItem(colorsList, rowIndex); }
// button up click - moves selected row Upper private void btnUp_Click(object sender, EventArgs e) { DataGridView dgv = imgPathDataGridView; try { DGVManipulation.MoveDGVRowUp(dgv); if (imgPathDataGridView.CurrentRow.Cells.Count > 0) { pictureBox.Image = Image.FromFile(dgv.CurrentRow.Cells[2].Value.ToString()); } } catch { } }
private void imgPathDataGridView_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.Left) { DataGridView dgv = imgPathDataGridView; try { DGVManipulation.MoveDGVRowUp(dgv); } catch { } } if (e.Control && e.KeyCode == Keys.Right) { DataGridView dgv = imgPathDataGridView; try { DGVManipulation.MoveDGVRowDown(dgv); } catch { } } }
private void moveUpButton_Click(object sender, EventArgs e) { DataGridView dgv = audioPathDataGridView; DGVManipulation.MoveDGVRowUp(dgv); }