I've implemented the custom pager code found at:
http://community.infragistics.com/aspnet/articles/learn-to-build-a-webdatagrid-custom-pager.aspx
In my WHDG. I am using a dataset to fill my grid. It displays data on page_load just fine, i fill my dataset then run the following:
this.Report_Grid.DataSource = m_ReportDataSet; this.Report_Grid.DataBind();
On postback for page 2 i fill the dataset in the pagechanged event the custom pager fires, then bind using the above code. As long as i am binding page 1 or 2 the correct data appears on the webpage.
However if i select any page number above 2 (3+) the WHDG displays on the page blank with no data (just headers). I have confirmed there is data in my dataset when I databind. but I can't figure out what is causing the data not to display. I have tested this against several datasets with different data ranges and the issues is consistent.
Now I am really confused. I added the below code for databinding event of the WHDG.
protected void Report_Grid_DataBinding(object sender, EventArgs e) { int i = 1; }
data now appears on the webpage for other pages but not all 100 rows i am sending it.
Ignore the above, it had no impact on it i just confused it with another change i made.
I seems to be a issue with the paging handling of that data. I was only loading 100 records into the dataset and asking the grid to display page 3, with pages of size 100. However I'm now loading all 8000 records into the dataset every time and I don't see any records except on page 1.
Ok, i see my mistake.
If i reload the whole dataset in each time the page loads then the paging works fine. But i had wanted the custom pager to allow me to control paging and the data displayed so that when I need to display data I only need to load the records into memory that i intent to display.
My error was that i had been expecting different functionality then it provided.