示例#1
0
文件: Grid.cs 项目: shine8319/DLS
 private void gridView1_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e)
 {
     if (e.RowHandle == gridView1.FocusedRowHandle && gridView1.FocusedColumn != e.Column)
     {
         e.Appearance.BackColor = gridView1.PaintAppearance.FocusedRow.BackColor;
         e.Appearance.ForeColor = gridView1.PaintAppearance.FocusedRow.ForeColor;
     }
 }
示例#2
0
 private void gridView1_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e)
 {
     if (e.Column.Caption == "订单状态")
     {
         if (e.CellValue.ToString() == "正常")
         {
             e.Appearance.BackColor = Color.Green;
         }
         else
         {
             e.Appearance.BackColor = Color.Red;
         }
     }
 }
示例#3
0
        void gvEvaluations_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e)
        {
            Evaluation evaluation = gvEvaluations.GetRow(e.RowHandle) as Evaluation;

            if (evaluation == null)
            {
                return;
            }
            if (evaluation.Rating == EvaluationRating.Good)
            {
                e.Appearance.ForeColor = ColorHelper.InformationColor;
            }
            if (evaluation.Rating == EvaluationRating.Poor)
            {
                e.Appearance.ForeColor = ColorHelper.CriticalColor;
            }
        }