获取GridView的rowdata
程序员文章站
2024-02-10 20:57:52
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