This is a migrated thread and some comments may be shown as answers.

[Solved] Paging Error

2 Answers 140 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 14 Aug 2009, 12:16 PM
I have a grid setup to page, but sometimes when I click Next or Prev or even select a page by number I will get the following error:

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.

Now I know this error is typically associated with trying to pass values from client to server that were not registered as acceptable input values, but I am not using any other controls on my page; the grid is the only control.

Any suggestions or solutions to my problem?





2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 14 Aug 2009, 12:23 PM
Hello Andrew,

This error actually is Event Validation exception which is caused if you try to submit the page before the entire page is loaded. Simple solution will be to not allow any clicks while the document is still loading.

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris Berry
Top achievements
Rank 1
answered on 21 Oct 2009, 06:46 PM
Another thing that you can do is to check out your Page_Load event and see if you're doing any type of data binding there. If so you might want to wrap that data binding in a If(!IsPostBack) {} statement so that you only hit that section of code once.

Hope this helps.
Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Chris Berry
Top achievements
Rank 1
Share this question
or