2011-01-07 8 views

답변

4

아마도 다음과 같은 접근 방식이 도움이 될 것입니다.

마크 업 :

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

코드 숨김

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; 
    } 
} 

- 파벨

관련 문제