当前位置:编程学习 > asp >>

获取GridView的rowdata

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                System.Data.DataRowView dv = e.Row.DataItem as System.Data.DataRowView;

                e.Row.Cells[2].Text = status.ConvertKeyToValue.DefectsTypeValue(dv.Row["类型"]);
                e.Row.Cells[3].Text = status.ConvertKeyToValue.DefectsLevelValue(dv.Row["等级"]);

            }
        }



摘自 AhJesus
补充:Web开发 , ASP.Net ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,