Hi Guys,

I am having a little programming jam at the moment. i have a datagridview set up whenever the user selects a row i am able to capture the necessary details but what i really want is the next row providing that the user selects the previous row.

example

users selects row 5

i want to capture row six details providing that there is a row six.


enclosed is the code snippet used to capture the selected row.

For Each rowd As DataGridViewRow In DataGridViewTransactions.SelectedRows
            Call GlobalFunctions.DeleteTransactionControl(rowd.Cells(0).Value, rowd.Cells(1).Value, rowd.Cells(4).Value, rowd.Cells(7).Value, "Delete")
        Next rowd

hello !
you can do like in this way

'place this code at the single click event of the grid
txt1.text = datagrid.item(0,datagrid.currentrow.index+1).value.tostring

hope this will solve your prob :)

Regards