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.
Thanks
5 Answers, 1 is accepted
Can you make sure that EnableViewState property of the grid is set to true? Paging with disabled control and page ViewState is not supported.
http://www.telerik.com/help/aspnet-ajax/grdviewstateoptimization.html
Sincerely yours,
Pavlina
the Telerik team

<
telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Skin="WebBlue"
AllowSorting="True" AutoGenerateColumns="False" PageSize="20"
OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound" EnableLinqExpressions="false"
onneeddatasource="RadGrid1_NeedDataSource" EnableViewState="true">
<HeaderContextMenu EnableTheming="True" Skin="PGC" EnableEmbeddedSkins="False">
<CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
</HeaderContextMenu>
<MasterTableView DataKeyNames="JobNo" EnableViewState="false"><Columns>
<telerik:GridTemplateColumn UniqueName="ViewJobDetail"><ItemTemplate>
<asp:HyperLink ID="ViewJob" Text="View Job" runat="server"></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="JobNo" ReadOnly="True" HeaderText="Job#" SortExpression="JobNo" Visible="False" UniqueName="JobNo">
<HeaderStyle HorizontalAlign="Left" ></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ClientName" ReadOnly="True" HeaderText="Client" SortExpression="ClientName" UniqueName="ClientName">
<HeaderStyle HorizontalAlign="Left" ></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Location" ReadOnly="True" HeaderText="Location" SortExpression="Location" UniqueName="Location">
<HeaderStyle HorizontalAlign="Left" ></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="JobType" ReadOnly="True" HeaderText="Job Type" SortExpression="JobType" UniqueName="JobType"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Status" ReadOnly="True" HeaderText="Status" SortExpression="Status" UniqueName="Status"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Dispatched" ReadOnly="True" HeaderText="Dispatched" SortExpression="Dispatched" UniqueName="Dispatched"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OpenDate" ReadOnly="True" HeaderText="Open Date" SortExpression="OpenDate" UniqueName="OpenDate">
<HeaderStyle></HeaderStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Station" ReadOnly="True" HeaderText="Station" SortExpression="Station" UniqueName="Station"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PONumber" ReadOnly="True" HeaderText="P.O. #" SortExpression="PONumber" UniqueName="PONumber"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CallID" ReadOnly="True" HeaderText="Call ID" SortExpression="CallID" UniqueName="CallID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ClientNo" ReadOnly="True" HeaderText="ClientNo" SortExpression="ClientNo" Visible="False" UniqueName="ClientNo"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings EnableRowHoverStyle="True" />
<FilterMenu EnableTheming="True" Skin="PGC" EnableEmbeddedSkins="False">
<CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
Thank You
To avoid this error you should set EnableViewState property of the MasterTableView to true:
<
MasterTableView
DataKeyNames
=
"JobNo"
EnableViewState
=
"true"
>
</
MasterTableView
>
Give it a try and let me know if further assistance is needed.
Regards,
Pavlina
the Telerik team

NeedDataSource
event would fire but it did not because the grid had data in it already (I Assume). So on the postback of the button click I was calling my LoadData routine and DataBind() which I thought was a no-no when using 'Advanced Binding' "NeedDatasource" event. I figured out on the postback I just need to call ReBind() and then NeedDataSource will fire.
Thanks for steering me in the right direction....does this logic sound correct.
Kerry
Indeed NeedDataSource event fires when a call to the grid's Rebind() method takes place. Please refer to the help article below for more information about in which cases this event fires:
http://www.telerik.com/help/aspnet-ajax/grdadvanceddatabinding.html
All the best,
Pavlina
the Telerik team