WebPart & DataGrid
I am developing simple WebPart - it consists only from DataGrid control, wich will displays the list of employees, also this WebPart implements ICellProvider interfeace.
In CreateChildControls I'm creating my DataGrid using following code:
employeeList.AutoGenerateColumns = false;
employeeList.AllowPaging = true;
employeeList.AllowCustomPaging = true;
employeeList.PageSize = 10;
I've located my WebPart on Sharepoint portal page and everything seems fine. But the problem occurs when DatraGrid has more than 1 pages.
When User navigates throught pages using Pager in direct order (from 1st page to 2nd, from 2nd to 3rd) data is displayed correctly, but when user tries to navigate in reverse order (I mean from 3rd page to 2nd page) DataGrid opens 1st page filled with data from 3rd page.
First, I thought that I was made a mistake during DataGrid filling, but I have developed simple WebApplication and the same logic works fine on aspx page, the problem occurs only with WebPart.
Does anyone knows how to solve this problem?