I have a DataGridView with thousands of records which I programmatically added them. There is no datasource involved in this case. Now I want to shuffle the records each time I click a button. How can that be achieved?
I have a DataGridView with thousands of records which I programmatically added them. There
Share
According to this question, you can use
DataGridView.Rows.RemoveAtandDataGridView.Rows.Insertto reposition rows in an unbound DataGridView. You can generate a set of random integer indexes to copy, remove and insert elsewhere in the table to recreate ‘shuffling’.