2009-05-06 5 views

Répondre

0

Si je comprends ce que vous demandez ... vous n'avez pas besoin de boucle ...

protected void GridView1_RowCommand(Object sender, GridViewCommandEventArgs e){ 
    if (e.CommandName == "thiscommandname") { 
     int index = Convert.ToInt32(e.CommandArgument); 
     GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index]; 
     //and then for example... 
     string rowText = (LinkButton)selectedRow.Cells[0].Controls[0]).Text;} 
} 
Questions connexes