How to get the RowIndex of SecondPage in GridView

637 views Asked by At

How to get the RowIndex of SecondPage in GridView in PageIndexChanged.

I have set AllowPaging="true" and PageSize="10"

So that the second row of second page of Grid should return the rowindex as 11.

Keeping in Mind the first row number of first page of grid is 0.

I know how to take the page index of first page but need to know how to take second page rowindex in the PageIndexChanged Event.

1

There are 1 answers

0
onof On

Use PageIndex property of GridView:

Sub MyGridView_PageIndexChanged(ByVal sender As Object, ByVal e As EventArgs)

    Dim currentPage As Integer = MyGridView.PageIndex


    ' Do something with page

  End Sub