The Grid is placed within an ascx file that is loaded within a Sharepoint webpart.
There are 2 webparts on the page. One is for the navigation and the other one contains the grid.
When you select an item on the navigation webpart, we are redirected to the page using window.location.href.
The first time the page is loaded and you press on the arrow in the radgrid to get to the next page, you get an "invalid postback or callback argument exception". if we click on the numbers itself, we don't get the invalid postback exception.
Also the first time we click a control in the radgrid that does a postback, the first postback is always a full postback, from the second one we have partial postbacks.
[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2132728System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +108System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +32System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
When you first have a full page postback, you don't get the error. For example when you first sort a column or select a page number.
After that the paging works fine, but the outlining of the columns isn't right anymore.
So my questions are:
- How can I fix the postback or callback argument exception?
- How to make sure the layout isn't broken after using the paging?
Note that we performed the fix for Sharepoint in the init.js related to Ajax submits.
Thanks in advance.