2011-01-07 5 views

Répondre

4

Peut-être que l'approche suivante aidera.

Markup:

<asp:GridView id="testGrid" OnRowDataBound="testGrid_RowDataBound" ... runat="server"> 
    ...... 
</asp:GridView> 

code-behind:

protected void testGrid_RowDataBound(object sender, GridViewRowEventArgs e) 
{ 
    string val = string.Empty; 

    if (e.Row.RowType == DataControlRowType.DataRow) 
    { 
     foreach(TableCell cell in e.Row.Cells) 
      val = cell.Text; 
    } 
} 

- Pavel

Questions connexes