now ive tried to use the radajax panel at a certain time am getting the error as
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: 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 find no actions take place if i click enableevent validation="false"
a)may i knw what is the cause of this error?
b)In Most of the Telerik Demo i find that they have been using sql datasource to bind data to the controls rather than code behind,wuld that be the reason for it?
Guys this is getting so serious and close pls just give me hint and ill be so greatfull to you all.
Awaiting for your Swift Reply
Thanks
Regards
N.Balaji
23 Answers, 1 is accepted
Could you please elaborate a bit more? Any information on your scenario may be of help on resolving that.
It will be best to isolate the issue in a sample and open a support ticket where you can send that. Thus we could do our best to help you in resolving the problem.
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" /> |
Regards,
Pavlina
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.

But you knw while adding those two lines such as page enable event validation and validate request.
I dont find anything happen my page is getting refreshed.
and is there any pther way to send zip attachment kindly pls help me coz am not affordable
Thanks
I am afraid that the provided information is not enough to determine what have caused the unexpected behavior.At this point I will ask you to open a formal support ticket and send us a simple running project demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.
Regards,
Pavlina
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.

If I leave the page tag at the top of my page to read...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadControlTests._Default" EnableEventValidation="true" %>
and use the built-in navigation arrows (not the page numbers, they work fine!) for my paged RadGrid, I get the following error...
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: 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.
but if I change my page tag to read...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadControlTests._Default" ValidateRequest="false" EnableEventValidation="false" %>
I no longer get the error, but the navigation arrows fail to navigate and nothing happens. Again, the page number navigation works ok.
Can you please make sure that EnableViewState property of the RadGrid / MasterTableView is set to true? Paging with disabled control ViewState is not supported.
http://www.telerik.com/help/aspnet-ajax/grdviewstateoptimization.html
Best wishes,
Pavlina
the Telerik team

paging works fine as long as i choose the page numbers, but using the graphic controls with the arrows always results in
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.
the property of the RadGrid / MasterTableView is set to true as recommended.
i have done everything recommended on this page, but not positive results.
Can you verify that the page ViewState is enabled?
Kind regards,
Pavlina
the Telerik team

I am sending you a simple working project that is working as expected. Please give it a try and let me know if it helps to resolve the problem.
Greetings,
Pavlina
the Telerik team

I had a look at the grid definiation and the code behind in your example and implemented it into my grid and it works well. Everything seems to work as it should now.
I think its a bit odd that some of the functionality of the grid seems to fail if you bind data in the normal way though, rather than on demand.
Karl
Can you please specify what exactly do you mean by "bind data in the normal way"? For more information about how to use simple data binding with a RadGrid control, I suggest that you examine this help article.
Kind regards,
Pavlina
the Telerik team

RadGrid1.DataBind();
Note that with this type of binding you need to change the sort direction and switch the pages manually as you will do with the standard MS GridView control in the same scenario.
If you would like these actions to be performed automatically, consider using advanced binding with NeedDataSource event handling.
Greetings,
Pavlina
the Telerik team


could you please explain me how you solved your problem.I am also getting the same error by rebinding the grid on each post back.

In the Page_Load event I was selecting data for the grid in this way:
Me
.MyObjectDataSource.SelectParameter(
"..."
).DefaultValue = ...
Me
.MyObjectDataSource.
Select
()
It is important NOT to do this if PostBack is active! So the right way is this:
If
IsPostBack =
False
Then
Me
.MyObjectDataSource.SelectParameter(
"..."
).DefaultValue = ...
Me
.MyObjectDataSource.
Select
()
End
If

If(IsPostback)
{
RadGrid1.Rebind()
}
When I moved the function call into an event handler after the page_load, like a checkbox_CheckedChanged event, evetything went fine.

the event can be 'dataneeded' event:
protected void RadGrid_OnDataSourceNeeded(object sender, EventArgs e)
{
DataTable table = GetTableFromCache();
RadGridSchadePremieRapport.DataSource = table;
//now no rebind() or databind() !
}

The following works without setting ValidateRequest="false". I load the Session during the Page_Load.
protected void rgEmployees_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
//no databind needed
if (rblYearSelect.SelectedValue == "thisYear")
{
DataTable employeeDataTable = (DataTable)Session["ThisYearDataTable"];
rgEmployees.DataSource = employeeDataTable;
}
else
{
DataTable employeeDataTable = (DataTable)Session["PriorYearDataTable"];
rgEmployees.DataSource = employeeDataTable;
}
}
protected void rblYearSelect_SelectedIndexChanged(object sender, EventArgs e)
{
if (!isLoading)
{
//do databind as needed
if (rblYearSelect.SelectedValue == "thisYear")
{
DataTable employeeDataTable = (DataTable)Session["ThisYearDataTable"];
rgEmployees.DataSource = employeeDataTable;
rgEmployees.DataBind();
}
else
{
DataTable employeeDataTable = (DataTable)Session["PriorYearDataTable"];
rgEmployees.DataSource = employeeDataTable;
rgEmployees.DataBind();
}
}
}
Judging by the provided description it seems to me that your export button is ajaxified. In this case, please examine the following link:
Export from Ajaxified Grid
Regards,
Daniel
the Telerik team

Setting the above at page level fixed my issue.

