Total Number of records required in paged .NET datagrid control

Posted by sumitchauhan on Stack Overflow See other posts from Stack Overflow or by sumitchauhan
Published on 2010-06-10T16:46:46Z Indexed on 2010/06/11 16:23 UTC
Read the original article Hit count: 208

Filed under:
|
|
|
|

I am using a data grid and has bound a data source with it.

I am trying to get the total number of records in the grid in overriden InitializePager method from pagedDataSource DataSourceCount.

I thought DataSourceCount returns number of records from SelectCountMethod of ObjectDataSource, but DataSourceCount is giving me the page size and not the total number of records, whereas when I debug and see in SelectCountMethod it is returning correct number of total Records.

I am not sure how to get the data from SelectCountMethod in DataGrid.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET