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