Number of rows in a gridview with paging and a filter.
-
Good morning experts, How can I get the total number of rows in a gridview that has paging and a filter. ex. dw.RowFilter = strFilter 'dw is a dataview GridView1.DataSource = dw GridView1.DataBind() gridview1.Rows.Count gives me the number of records in the current page dw.Table.Rows.Count gives me the number of all records ignoring the filter. Thanks
-
Good morning experts, How can I get the total number of rows in a gridview that has paging and a filter. ex. dw.RowFilter = strFilter 'dw is a dataview GridView1.DataSource = dw GridView1.DataBind() gridview1.Rows.Count gives me the number of records in the current page dw.Table.Rows.Count gives me the number of all records ignoring the filter. Thanks
-
Use dw.Count instead of dw.Table.Rows.Count when you use the Table property of the dw DataView you're referencing the original table and not the DataView itself
Greets! Joel