I'm using the OOTB SPGridViewPager control associated with an SPGridView. This worked fine in 2007 but now we've upgraded to 2010, I get the following error when trying to page through the dataset;
System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'. at Microsoft.SharePoint.WebControls.SPGridView.set_PageIndex(Int32 value) at Microsoft.SharePoint.WebControls.SPGridViewPager.OnClickNext(EventArgs args) at Microsoft.SharePoint.WebControls.SPGridViewPager.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint
My code is still referring to the version 12 Microsoft.SharePoint assembly so I'm not quite sure what's changed to cause the issue.