Hello,
I'm trying to see all the benefits of telerik components for a project. I'm trying to display a insert/update/delete grid on a web page. I'm working with the framework 4.0. The version of the Telerik.Web.UI.dll is 2011.1.519.40
My problem is, when i'm choose the edit button, i've got a error message
My aspx.cs page
Thanks for your time
I'm trying to see all the benefits of telerik components for a project. I'm trying to display a insert/update/delete grid on a web page. I'm working with the framework 4.0. The version of the Telerik.Web.UI.dll is 2011.1.519.40
My problem is, when i'm choose the edit button, i've got a error message
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 searched on the internet about this problem but didn't find a real answer.
I can't assign false value the validationEvent tag as it's not secure.
Do you have any idea ?
Here is my code (quite simple)
My Content page
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ListeFormateurs.aspx.cs" Inherits="ProtoFTCartoAjax.ListeFormateurs" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> Ceci est la liste des formateurs<br /> <br /> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="True" EnableViewState="True"> <MasterTableView CommandItemDisplay="Top" DataKeyNames="Identifiant" AutoGenerateColumns="False" EditMode="InPlace" > <Columns> <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="EditCommandColumn"> <HeaderStyle Width="85px"></HeaderStyle> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn UniqueName="FirstName" HeaderText="First name" DataField="Nom" /> <telerik:GridBoundColumn UniqueName="LastName" HeaderText="Last name" DataField="Prenom" /> </Columns> </MasterTableView> </telerik:RadGrid> </asp:Content> My aspx.cs page
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DAL; namespace ProtoFTCartoAjax { public partial class ListeFormateurs : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { List<FormateurDto> liste = FormateurFactory.SelectAll(); RadGrid1.DataSource = liste; RadGrid1.DataBind(); } } }Thanks for your time