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

Problem with Group header Item Sorting

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vijayaraj
Top achievements
Rank 1
Vijayaraj asked on 14 Sep 2011, 07:39 PM
When I do sorting on the grouped item in group header get this 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.


I bind data and create columns to the grid from code behind on pageload. Am i missing something?
Thanks in advance for your support.

Regards,
Vijay

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Sep 2011, 06:35 AM
Hello Vijayaraj,

Basically the problem you are facing is caused of abnormal change of the ViewState during postbacks. Event validation checks the incoming values in a POST to ensure the values are recognized. In other words, saved hash values in the __EVENTVALIDATION are different from these send through POST method.

One of the possible, solution is to disable Event Validation.
Change this line:   
      
<@Page ... enableEventValidation="true"  />   
     
To:   
     
<@Page ... validateRequest="false" enableEventValidation="false" />

Thanks,
Princy.
Tags
Grid
Asked by
Vijayaraj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or