views:

38

answers:

1

I have a gridview and in this grid i allow paging with page size 10. Now I want to find the total number of records on every page index. For example on page index 1 I have 10 records and on page index 2 I have 4 record so how do I count the number of record I just mentioned above?

A: 

If gv is your gridview with paging:

var currentCount = (gv.PageIndex - 1) * gv.PageSize + gv.Rows.Count;
Mikael Svenson
so how i count records on current page
Neo
Edited my answer. gw.Rows.Count gives the item count for the current page.
Mikael Svenson