Hey,
Here is the problem I am having.
I have a datagrid view where some of the row's visibility is set to False depending on the users input.
That means that it is possible for the first 3 rows to have index's that are not in order.
For example: The user will see 3 rows but the indexes for those three rows to have indexes such as: 1,20,56
If I were to program buttons "Up" and "Down" how would I go about doing this?
If all rows are visible I can just use this:
The only way of I can think of doing this is with a loop that checks for visibility but that doesnt seem efficient.
Here is the problem I am having.
I have a datagrid view where some of the row's visibility is set to False depending on the users input.
That means that it is possible for the first 3 rows to have index's that are not in order.
For example: The user will see 3 rows but the indexes for those three rows to have indexes such as: 1,20,56
If I were to program buttons "Up" and "Down" how would I go about doing this?
If all rows are visible I can just use this:
Code:
DataGridView1.CurrentCell = DataGridView1(DataGridView1.CurrentCell.ColumnIndex, DataGridView1.CurrentRow.Index + 1)