Bonjour j'ai un problème avec l'evénement RowUpdating. En effet, lorsque je clique sur Update aucun code ne s'éxécute même un Response.Write(""): voila le code :
<asp:GridView ID="Profile_GridView" runat="server" CellPadding="4" DataKeyNames="profile_id"
ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" OnRowCancelingEdit="Profile_GridView_RowCancelingEdit" OnRowEditing="Profile_GridView_RowEditing" OnRowDeleting="Profile_GridView_RowDeleting" OnRowUpdating="Profile_GridView_RowUpdating" OnRowUpdated="Profile_GridView_RowUpdated" >
--------
--------
<asp:CommandField ButtonType ="Image" ShowEditButton="True"
EditImageUrl="Modifier.jpg"
EditText ="Modifier"
CancelImageUrl ="Modifier_Cancel_1.jpg"
CancelText ="Annuler"
UpdateText ="Mise a jour"
UpdateImageUrl ="Modifier_Ok_1.jpg" />
Voila le code c# :
protected void Profile_GridView_RowEditing(object sender, GridViewEditEventArgs e)
{
Profile_GridView.EditIndex = e.NewEditIndex;
Profile_GridView.DataBind();
Response.Write("<H1>En mode edition !!!!!!");
}
protected void Profile_GridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
Profile_GridView.DataBind();
//Profile_GridView.EditIndex = -1;
Response.Write("<H1>En mode update !!!!!!");
}