欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

获取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