Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27186

VS 2010 DataGridView Assistance. Selecting next row/call

$
0
0
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:
Code:

DataGridView1.CurrentCell = DataGridView1(DataGridView1.CurrentCell.ColumnIndex, DataGridView1.CurrentRow.Index + 1)
The only way of I can think of doing this is with a loop that checks for visibility but that doesnt seem efficient.

Viewing all articles
Browse latest Browse all 27186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>