using DevExpress.XtraGrid.Views.Grid;
    //注册RowStyleChange事件
    private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
    {
        GridView view = sender as GridView;
        if (e.RowHandle >= 0)
        {
            string category = view.GetRowCellDisplayText(e.RowHandle, view.Columns["Category"]);
            if (category == "Beverages")
            {
                e.Appearance.BackColor = Color.Salmon;
                e.Appearance.BackColor2 = Color.SeaShell;
            }
        }

相关文章:

  • 2022-01-14
  • 2021-09-11
  • 2022-12-23
  • 2021-06-16
  • 2021-07-30
  • 2022-12-23
  • 2021-08-22
猜你喜欢
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案