I am using PagedDataSource for gridview's custom paging. Here is the code:
PagedDataSource dataSource = new PagedDataSource();
int virtualRowCount = Convert.ToInt32(dataset.Tables[1].Rows[0]["TotalRows"]);
dataSource.AllowCustomPaging = true;
dataSource.PageSize = 15;
dataSource.VirtualCount = virtualRowCount;
dataSource.DataSource = dataset.Tables[0].DefaultView;
gvTaxPayerLoginDetail.DataSource = dataSource;
gvTaxPayerLoginDetail.DataBind();
I am returning the "totalrows" from my Stored procedure (which is set in virtualRowCount) and actual rows in tables[0]
of dataset. I am getting the results however my pager is gone. The pager is no longer shown. How can I tell the gridview to pick up value from PagedDataSource?
Working with ASP.Net 4