Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call RowEditing from image button
Message
De
11/04/2007 10:40:16
 
 
À
10/04/2007 14:45:08
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01214099
Message ID:
01214425
Vues:
9
I can't give you specifics about ASP.NET GridView's, since I hardly use WebForms, but the error you're seeing is because you're calling the RowEditing method without any parameters and the method signature is expecting parameters. So, you probably need something like this instead:
protected void  ImageButton1_RowEditing(object sender, ImageClickEventArgs e)
{
   this.GridView1.GridView1_RowEditing(sender, new GridViewEditEventArgs());
}
~~Bonnie



>Hi all,
>
>I am learning C# trying many examples. Following lines of code gives message:
>
>Error 1	'System.Web.UI.WebControls.GridView' does not contain a definition for 'GridView1_RowEditing'	
>(pointing to ImageButton1_RowEditing() )
>
>
>public int EditIndex = -1;
>protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
>{
>    GridView1.EditIndex = e.NewEditIndex;
>}
>
>protected void  ImageButton1_RowEditing(object sender, ImageClickEventArgs e)
>{
>   this.GridView1.GridView1_RowEditing();
>}
>
>
>What would be a proper call of GridView1_RowEditing in ImageButton1_RowEditing ?
>TIA,
>Gojko
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform