Move next and previous in DataGridView

473 Views Asked by At

I've been trying to figure it out how to move next and previous through records in a DataGridView. I'm using the code below but it doesn't make any action when I press eiher next or previous button. (nothing found as answer helped me)

    private void btnNext_Click/btnPrevious_Click(object sender, EventArgs e)
    {
        if (linie == 0)
        {
            { linie = tabauto.Rows.Count+1/-1; }
        }
        else {linie ++/--;}
        popAutogari();
    }

P.S - popAutogari(); is the method use to bind the Grid.

Any help?

0

There are 0 best solutions below