Count total rows of gridview with pagination

前端 未结 12 852
失恋的感觉
失恋的感觉 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:29

    If you have a gridview which will be filled using a datatable or dataset then count the datatable or dataset (ds.table(0).rows.count) For example

    For cnt1 = 0 To Total_batchRecords - 1
       dgchgsdtl1.Rows.Item(cnt1).FindControl("ControlName"), Label)
    Next
    

提交回复
热议问题