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

Pagging problem

4 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jouni
Top achievements
Rank 1
Jouni asked on 20 Jan 2009, 07:00 AM

When I push the pagging button, I got this error message:

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.


What causes this problem ?

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Jan 2009, 09:31 AM
Hello Jouni,

Are you calling any DataBind() or Rebind() method for the grid in the PageLoad event? If so, either try removing that or try setting the EnableEventValidation attribute of your page Directive to False as shown below:
aspx:
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="Default.aspx.cs" Inherits="_Default" %>  

Thanks
Princy.
0
Jouni
Top achievements
Rank 1
answered on 20 Jan 2009, 11:33 AM
Yes I am calling Rebind method and that causing error.How to I resolved it ?.I need to bind grid every time when page is loaded.I try to use this:
<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="De 


Now System doesnt crash, but nothing happen, when i push pagging buttons

0
Saurabh
Top achievements
Rank 1
answered on 19 May 2009, 03:47 PM
Hi,

I am facing the same issue. Did anyone get a workaround? Please help as this is urgent.
0
Luis
Top achievements
Rank 1
answered on 25 Sep 2009, 02:03 PM
hi,
i solved the problem as i read in one post in the forum

binding the grid in the oninit(C#), init(VB) event

Protected Sub RadGrid1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.Init
    RadGrid1.DataBind()
End Sub


thanks to "Hans Notelteirs"
Tags
Grid
Asked by
Jouni
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jouni
Top achievements
Rank 1
Saurabh
Top achievements
Rank 1
Luis
Top achievements
Rank 1
Share this question
or