获取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["等级"]);



            }

        }

 

你可能感兴趣的:(GridView)