110,577
社区成员
发帖
与我相关
我的任务
分享
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
Label olabel;
//弹出明细行的数据的 背景色改掉!
if (e.Row.RowType == DataControlRowType.Header )
{
for (int iCol = 0; iCol < e.Row.Cells.Count; iCol++)
{
if (e.Row.Cells[iCol].Text.ToString().IndexOf("小计") > 0)
//这个TEXT取出的值永远是空的?列是自动生成的 后在DATAROW里 这样写是可以取到值的,不知道为什么
{
e.Row.Cells[iCol].BackColor = System.Drawing.Color.Green;
}