DataGrid1_ItemDataBound中设字体颜色

 

  e.Item.Cells[7].ForeColor = Color.SeaGreen;

           DataGrid1.Items.Count.ToString()

           for (int i = 0; i < GV_ChRe.Rows.Count; i++)

         {

           int num = Convert.ToInt32(this.GV_ChRe.Rows[i].Cells[9].Text.Trim());

           if (num < 0)

           this.GV_ChRe.Rows[i].Cells[9].ForeColor = Color.Red;

         }

posted @ 2008-06-05 10:23  XGU_Winner  阅读(210)  评论(0编辑  收藏  举报