private void SetGridRowStyle()

        {

            //颜色设置

            if ( !string.IsNullOrEmpty(txtCphm.Text) ) {

 

                MainView.FormatConditions.Clear();

                DevExpress.XtraGrid.StyleFormatCondition styleFormatBlue = new DevExpress.XtraGrid.

                             StyleFormatCondition(DevExpress.XtraGrid.FormatConditionEnum.Equal, clCphm, "", txtCphm.Text.ToUpper(), "");

                styleFormatBlue.Appearance.ForeColor = System.Drawing.Color.Red;

                styleFormatBlue.Appearance.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);

                styleFormatBlue.Appearance.BackColor = Color.Yellow;

                styleFormatBlue.ApplyToRow = true;

                MainView.FormatConditions.Add(styleFormatBlue);

 

 

            }

        }

相关文章:

  • 2021-06-25
  • 2021-08-06
  • 2022-12-23
  • 2021-08-10
  • 2022-01-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案