Repositioning DataGridView Rows

Is there an easy way to swap the position of two rows in an unrelated DataGridView? I use it to display an ordered list, where I want the up / down arrow keys to shuffle the row up and down the grid, but I don't see any way to move the row inside the grid without completely reloading this, which seems excessive. The index value for the row is read-only.

+1
source share
2 answers

to move the row, use DataGridView.Rows.RemoveAt and then DataGridView.Rows.Insert

+4
source

, BindingSource ( , bindingSource), bindSource.RemoveAt(x) bindingSource.insert(x) (, ) DataGridView .

0