2013-06-29 45 views
0

我想從DataRowView獲得列(Description)。我有以下代碼。在GridView中查找列值

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) 
     { 

      if (e.Row.DataItem != null) 
      { 
       DataRowView dataRowView = ??????????? 
       string description = dataRowView["Description"] as string; 
      } 

     } 

如何用適當的代碼替換??????????

回答

0

使用(DataRowView)e.Row.DataItem;