DataTable绑定到GridView时,RowDataBound事件
protected void EgvPhotoAdvertisement_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { System.Data.DataRowView dt = (System.Data.DataRowView)e.Row.DataItem; string imgPath = dt.DataView[e.Row.RowIndex]["UploadFiles"].ToString(); ... ... } }
最后更新:2017-04-02 06:52:16