J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec
un datagrid. J'ai mis en place du code pour rendre possible la modification
des données du datagrid. Seulement j'obtiens les erreurs suivantes à la
génération.
C:\Inetpub\wwwroot\AppliWebTest\publishers.aspx.cs(67): La méthode
'AppliWebTest.publishers.dgrTitles_CancelCommand(object,
System.Web.UI.WebControls.DataGridCommandEventArgs)' ne correspond pas au
délégué 'void System.EventHandler(object, System.EventArgs)'
Je ne comprends pas trop ce qui se passe ...
j'ai créé les procédure suivante dans la webform
void dgrTitles_EditCommand(object sender, DataGridCommandEventArgs e)
void dgrTitles_UpdateCommand(object sender, DataGridCommandEventArgs e)
void dgrTitles_CancelCommand(object sender, DataGridCommandEventArgs e)
Voilà ce que j'ai pour le initializeComponent
private void InitializeComponent()
{
this.dgrTitles.EditCommand += new
System.EventHandler(this.dgrTitles_EditCommand);
this.dgrTitles.CancelCommand += new
System.EventHandler(this.dgrTitles_CancelCommand);
this.dgrTitles.UpdateCommand += new
System.EventHandler(this.dgrTitles_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Roman
"grome" a écrit :
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec un datagrid. J'ai mis en place du code pour rendre possible la modification des données du datagrid. Seulement j'obtiens les erreurs suivantes à la génération.
Il faut créer un handler de type DataGridCommandEventHandler.
this.dgrTitles.CancelCommand += new System.EventHandler(this.dgrTitles_CancelCommand);
Essayez comme ça:
this.dgrTitles.CancelCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgrTitles_CancelCommand);
"grome" a écrit :
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec
un datagrid. J'ai mis en place du code pour rendre possible la modification
des données du datagrid. Seulement j'obtiens les erreurs suivantes à la
génération.
Il faut créer un handler de type DataGridCommandEventHandler.
this.dgrTitles.CancelCommand += new
System.EventHandler(this.dgrTitles_CancelCommand);
Essayez comme ça:
this.dgrTitles.CancelCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgrTitles_CancelCommand);
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec un datagrid. J'ai mis en place du code pour rendre possible la modification des données du datagrid. Seulement j'obtiens les erreurs suivantes à la génération.
Il faut créer un handler de type DataGridCommandEventHandler.
this.dgrTitles.CancelCommand += new System.EventHandler(this.dgrTitles_CancelCommand);
Essayez comme ça:
this.dgrTitles.CancelCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgrTitles_CancelCommand);
grome
en fait il fallait écrire ceci
private void InitializeComponent()
{
this.dgrTitles.SelectedIndexChanged += new System.EventHandler(this.dgrTitles_SelectedIndexChanged);
this.dgrTitles.CancelCommand += new DataGridCommandEventHandler(this.dgrTitles_CancelCommand );
this.dgrTitles.EditCommand += new DataGridCommandEventHandler(this.dgrTitles_EditCommand);
this.dgrTitles.UpdateCommand += new DataGridCommandEventHandler(this.dgrTitles_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
"grome" a écrit dans le message de news: 426f9369$0$14260$
bonjour à tous,
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec un datagrid. J'ai mis en place du code pour rendre possible la modification des données du datagrid. Seulement j'obtiens les erreurs suivantes à la génération.
C:InetpubwwwrootAppliWebTestpublishers.aspx.cs(67): La méthode 'AppliWebTest.publishers.dgrTitles_CancelCommand(object, System.Web.UI.WebControls.DataGridCommandEventArgs)' ne correspond pas au délégué 'void System.EventHandler(object, System.EventArgs)'
Je ne comprends pas trop ce qui se passe ...
j'ai créé les procédure suivante dans la webform
void dgrTitles_EditCommand(object sender, DataGridCommandEventArgs e) void dgrTitles_UpdateCommand(object sender, DataGridCommandEventArgs e) void dgrTitles_CancelCommand(object sender, DataGridCommandEventArgs e) Voilà ce que j'ai pour le initializeComponent
private void InitializeComponent() { this.dgrTitles.EditCommand += new System.EventHandler(this.dgrTitles_EditCommand); this.dgrTitles.CancelCommand += new System.EventHandler(this.dgrTitles_CancelCommand); this.dgrTitles.UpdateCommand += new System.EventHandler(this.dgrTitles_UpdateCommand); this.Load += new System.EventHandler(this.Page_Load); }
en fait il fallait écrire ceci
private void InitializeComponent()
{
this.dgrTitles.SelectedIndexChanged += new
System.EventHandler(this.dgrTitles_SelectedIndexChanged);
this.dgrTitles.CancelCommand += new
DataGridCommandEventHandler(this.dgrTitles_CancelCommand );
this.dgrTitles.EditCommand += new
DataGridCommandEventHandler(this.dgrTitles_EditCommand);
this.dgrTitles.UpdateCommand += new
DataGridCommandEventHandler(this.dgrTitles_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
"grome" <no@spam.fr> a écrit dans le message de news:
426f9369$0$14260$636a15ce@news.free.fr...
bonjour à tous,
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec
un datagrid. J'ai mis en place du code pour rendre possible la
modification des données du datagrid. Seulement j'obtiens les erreurs
suivantes à la génération.
C:InetpubwwwrootAppliWebTestpublishers.aspx.cs(67): La méthode
'AppliWebTest.publishers.dgrTitles_CancelCommand(object,
System.Web.UI.WebControls.DataGridCommandEventArgs)' ne correspond pas au
délégué 'void System.EventHandler(object, System.EventArgs)'
Je ne comprends pas trop ce qui se passe ...
j'ai créé les procédure suivante dans la webform
void dgrTitles_EditCommand(object sender, DataGridCommandEventArgs e)
void dgrTitles_UpdateCommand(object sender, DataGridCommandEventArgs e)
void dgrTitles_CancelCommand(object sender, DataGridCommandEventArgs e)
Voilà ce que j'ai pour le initializeComponent
private void InitializeComponent()
{
this.dgrTitles.EditCommand += new
System.EventHandler(this.dgrTitles_EditCommand);
this.dgrTitles.CancelCommand += new
System.EventHandler(this.dgrTitles_CancelCommand);
this.dgrTitles.UpdateCommand += new
System.EventHandler(this.dgrTitles_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
this.dgrTitles.SelectedIndexChanged += new System.EventHandler(this.dgrTitles_SelectedIndexChanged);
this.dgrTitles.CancelCommand += new DataGridCommandEventHandler(this.dgrTitles_CancelCommand );
this.dgrTitles.EditCommand += new DataGridCommandEventHandler(this.dgrTitles_EditCommand);
this.dgrTitles.UpdateCommand += new DataGridCommandEventHandler(this.dgrTitles_UpdateCommand);
this.Load += new System.EventHandler(this.Page_Load);
}
"grome" a écrit dans le message de news: 426f9369$0$14260$
bonjour à tous,
J'ai un souci avec le code ci dessous. Pour résumer, j'ai une webform avec un datagrid. J'ai mis en place du code pour rendre possible la modification des données du datagrid. Seulement j'obtiens les erreurs suivantes à la génération.
C:InetpubwwwrootAppliWebTestpublishers.aspx.cs(67): La méthode 'AppliWebTest.publishers.dgrTitles_CancelCommand(object, System.Web.UI.WebControls.DataGridCommandEventArgs)' ne correspond pas au délégué 'void System.EventHandler(object, System.EventArgs)'
Je ne comprends pas trop ce qui se passe ...
j'ai créé les procédure suivante dans la webform
void dgrTitles_EditCommand(object sender, DataGridCommandEventArgs e) void dgrTitles_UpdateCommand(object sender, DataGridCommandEventArgs e) void dgrTitles_CancelCommand(object sender, DataGridCommandEventArgs e) Voilà ce que j'ai pour le initializeComponent
private void InitializeComponent() { this.dgrTitles.EditCommand += new System.EventHandler(this.dgrTitles_EditCommand); this.dgrTitles.CancelCommand += new System.EventHandler(this.dgrTitles_CancelCommand); this.dgrTitles.UpdateCommand += new System.EventHandler(this.dgrTitles_UpdateCommand); this.Load += new System.EventHandler(this.Page_Load); }