Count total rows of gridview with pagination

前端 未结 12 859
失恋的感觉
失恋的感觉 2020-12-03 12:02

I have a GridView with paging. When I try to count gridview row with gridview.rows.count, It gives me row count for current page only.

How can I get total rows of G

12条回答
  •  醉话见心
    2020-12-03 12:25

    yes, that's true, it will only return the current page rows only. If you really want to get the total row count, you need to get from your datasource instead.

    Like... if you have DataTable then it will be like...

    DataTable.Rows.Count
    

提交回复
热议问题