获取GridView的rowdata
程序员文章站
2022-03-30 11:29:46
protected void gridview1_rowdatabound(object sender, gridviewroweventargs e)
&nbs...
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