1

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.

Amarnath Balasubramanian
  • 9,300
  • 8
  • 34
  • 62

1 Answers1

0

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
onof
  • 17,167
  • 7
  • 49
  • 85