We use rad controls a lot and they are great.
error:
505|error|500|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.|
browser:
Unexpected Quantifier
When:
When I click on image in my RadButtonColumn-Handling it through Grid_onSelectIndexChanged event handler to load a form below.
I cannot turn off the event validation for we need to validate the data before it hits the server.
Do not exactly know what and how to register controls using ClientScript.RegisterForEventValidation
Really caught here for several hours ,please can you put some light into this issue.
I have never seen an error like this for any server post backs except this scenario where I have a radbuttoncolumn when selected need to load form below.
Appreciate your help!
Thanks
7 Answers, 1 is accepted

Any response to this issue?
Thanks
Can you confirm that the page/control ViewState is enabled? If so, please send us the grid declaration for further investigation.
All the best,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

ok-
1.on OnSelectedIndexChanged ,it seems like all the text_Changed events (in the form below)are getting fired before the 'OnSelectedIndexChanged ' event itself gets fired .
2.And in the text_changed event handler we do a databind to the grid.Soon after this databind is when I see this error.
-----grd_aspx--------
<
rad:RadGrid runat="server" id="grdGrid" OnSelectedIndexChanged="IndexChanged" OnColumnCreated="GrdCreated"
ItemStyle-Wrap="false" EnableViewState = "true"
ShowHeader="true" ShowFooter="true" >
<FooterStyle Font-Bold="true" />
<MasterTableView>
<Columns>
<rad:GridButtonColumn ImageUrl="../../images/icons/edit_16.gif" CommandName="Select" ButtonType="ImageButton" UniqueName="EditIcon" HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
<rad:GridBoundColumn HeaderText="Portfolio" DataField="PortfolioName" />
<rad:GridTemplateColumn HeaderText="ABC" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:Label ID="ABC" runat="server" Text='<%# Eval("ABC").ToString() %>' />
</ItemTemplate>
<FooterTemplate>
<asp:Label runat="server" Text="Total" />
</FooterTemplate>
</rad:GridTemplateColumn>
<rad:GridTemplateColumn HeaderText="DEF" UniqueName="DEF">
<ItemTemplate>
<%
# string.Format("{0}{1}", CurrencySymbol, String.Format("{0:#,0.00}", Eval("DEF")))%>
</ItemTemplate>
<FooterTemplate>
<%
# string.Format("{0}{1}", CurrencySymbol, String.Format("{0:#,0.00}", totalDEF)) %>
</FooterTemplate>
</rad:GridTemplateColumn>
<rad:GridTemplateColumn HeaderText="GHI" UniqueName="GHI">
<ItemTemplate>
<%
# string.Format("{0}{1}", CurrencySymbol, String.Format("{0:#,0.00}", Eval("GHI")))%>
</ItemTemplate>
<FooterTemplate>
<%
# string.Format("{0}{1}", CurrencySymbol, String.Format("{0:#,0.00}", totalGHI))%>
</FooterTemplate>
</rad:GridTemplateColumn>
<<rad:GridTemplateColumn HeaderText="JKL">
<ItemTemplate>
<%
# string.Format("{0}{1}", Eval("JKL") == null || Eval("JKL").ToString() == string.Empty ? string.Empty : CurrencySymbol, String.Format("{0:#,0.00}", Eval("JKL")))%>
</ItemTemplate>
<FooterTemplate>
<%
# string.Format("{0}{1}", CurrencySymbol, String.Format("{0:#,0.00}", totalJKL)) %>
</FooterTemplate>
</rad:GridTemplateColumn>
<rad:GridTemplateColumn UniqueName = "abc" HeaderText = "abc" >
<ItemTemplate>
<%
# string.Format("{0}", Eval("abc") == null || Eval("abc").ToString() == string.Empty || Eval("abc").ToString() == "-999999" ? "-" : String.Format("{0:0.00%}", Eval("abc")))%>
</ItemTemplate>
<FooterTemplate>
<%
# string.Format("{0}", Totalabc == -999999 ? "-" : String.Format("{0:0.00%}", Totalabc))%>
</FooterTemplate>
</rad:GridTemplateColumn>
<rad:GridTemplateColumn HeaderText="Clear" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../../images/icons/clear_16.gif" ToolTip='<%# string.Format("Clears the values for {0} - {1}",Eval("xxx"),Eval("xxx"))%>' OnClick="Clear_OnClick" OnClientClick='<%# Eval("xxx", "return confirm(\"Are you sure you want to clear {0}?\");") %>' />
</ItemTemplate>
</rad:GridTemplateColumn>
<rad:GridTemplateColumn HeaderImageUrl="../../images/icons/warning_16.gif" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton ID="Warning" runat="server" ImageUrl="../../images/icons/warning_16.gif" Visible='<%# Eval("someChecks") == null ? false : Eval("someChecks").ToString() == string.Empty ? false : true %>' ToolTip='<%# Eval("someChecks") %>' />
</ItemTemplate>
</rad:GridTemplateColumn>
</Columns>
</MasterTableView>
</rad:RadGrid>
---form_aspx---
sample....
<tr>
<td class="CellLabel">
<asp:Label ID="xxxx" runat="server" Text="xxxx:" />
</td>
<td class="CellValue">
<asp:Label ID="xxxx" runat="server" />
</td>
<td class="CellLabel">
<asp:Label ID="xxxxxx" runat="server" Text="xxxxxx:" />
</td>
<td class="CellValue">
<rad:RadNumericTextBox ID="xxxxxx" runat="server" OnTextChanged="xxxx_OnTextChanged" AutoPostBack="true" />
</td>
</tr>
I used your code in the attached sample but was not able to replicate the issue. Can you check it out and let me know what differs in your case?
Also I am not sure what is the mentioned text_changed event.
Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Let me give you the event handlers.
1.radgrid -OnSelectedIndexChanged="IndexChanged" -Loads the form below the grid with row data details.
protected void IndexChanged(object sender, EventArgs e)
{
int index = grdGrid.SelectedItems[0].DataSetIndex;
SelectedIndex = index;
// store selection
UpdateDisplay(
);
}
2.Form below the rad grid - the data gets updated when a row is selected in the grid.
sample
tr>
<td class="CellLabel"> <asp:Label ID="xxxx" runat="server" Text="xxxx:" /> </td>
<td class="CellValue"> <asp:Label ID="xxxx" runat="server" /> </td>
<td class="CellLabel"> <asp:Label ID="xxxxxx" runat="server" Text="xxxxxx:" /> </td>
<td class="CellValue"> <rad:RadNumericTextBox ID="xxxxx" runat="server" OnTextChanged="xxxxx_OnTextChanged" AutoPostBack="true" /> </td>
</tr>
//code behind
protected void xxxxx_OnTextChanged(object sender, EventArgs e)
{
var value = UpdateData();
//calculates IRR/MD on endbalance or netRor changes
CalculateBasedOnValueChange(value);
// Validate and rebind the grid
grdGrid.DataSource = value;
grdGrid.DataBind();
grdGrid.MasterTableView.Items[SelectedIndex].Selected = true;
}
So when a row is selected in the grid ...before 'IndexChanged' gets fired the 'xxxxx_OnTextChanged' gets fired (validation?) in which I am rebinding the grid to update the grid with latest changes in the form.
After this databind is when I see this javascript error.
If I comment out the databind ...there is no error ,everything is fine.
1.One -we could disable client side validation(EnableEventValidation = "false") which I do not want to do.
2.add event on prerender--ClientScript.RegisterForEventValidation() and register all the controls that needs validation--how will this help?
Definitely the validation is what is screwing up on databind.something is not what it has to be.
I will dig in this issue this weekend will update you if I get to something....Let me know if you could reproduce it or get some pointer.
Hope I made more sense this time.
Appreciate your help.
Thank you

try this, first set your EnableEventValidation="false"
I added the code for the TextBox and its server-side event, but stil cannot replicate the error. Can you try running the updated sample and let me know how it goes on your end? And what differs in your case? It would be greate if you specify what should I change so I can replicate the issue on my side as well.
Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.