I have a grid akin to the following which has as its DataSourceID a LinqDataSource:
All columns have AutoPostBackOnFilter="false" and have a SortExpression. Whenever I click the button in the CommandItemTemplate I get the following 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.
For those that answer with "use Advanced Binding", how do I replicate all the functionality of the LinqDataSource in code-behind?
<
telerik:RadGrid
ID
=
"MyGrid"
runat
=
"server"
AllowAutomaticInserts
=
"false"
AllowFilteringByColumn
=
"true"
AllowSorting
=
"true"
PageSize
=
"15"
ShowFooter
=
"true"
EnableLinqExpressions
=
"true"
OnUpdateCommand
=
"MyGrid_UpdateCommand"
OnItemDataBound
=
"MyGrid_ItemDataBound"
DataSourceID
=
"MyLinqDataSource"
>
<
PagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
/>
<
MasterTableView
AutoGenerateColumns
=
"false"
EditMode
=
"InPlace"
AllowFilteringByColumn
=
"true"
DataKeyNames
=
"Id"
OverrideDataSourceControlSorting
=
"true"
Width
=
"1700px"
TableLayout
=
"Fixed"
CommandItemDisplay
=
"Top"
>
<
CommandItemTemplate
>
<
asp:Button
ID
=
"SearchButton"
runat
=
"server"
Text
=
"Search"
Width
=
"100px"
Height
=
"2em"
CommandName="<%=RadGrid.FilterCommandName %>" />
</
CommandItemTemplate
>
<
Columns
>
...
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowColumnsReorder
=
"true"
>
<
Resizing
AllowColumnResize
=
"true"
AllowResizeToFit
=
"true"
EnableRealTimeResize
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
All columns have AutoPostBackOnFilter="false" and have a SortExpression. Whenever I click the button in the CommandItemTemplate I get the following 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.
For those that answer with "use Advanced Binding", how do I replicate all the functionality of the LinqDataSource in code-behind?