【问题标题】:How can I change the backcolor of a row in a DevExpress GridView?如何更改 DevExpress GridView 中一行的背景色?
【发布时间】:2012-10-31 08:53:16
【问题描述】:

我的表单中有一个 DevExpress GridView,由于布尔值,我需要更改一些行的颜色。

什么属性可以让我改变一行的背景色??

【问题讨论】:

    标签: c# winforms devexpress


    【解决方案1】:

    您可以在RowStyle 事件处理程序中更改行的颜色渐变:

    private void myGridView_RowStyle(object sender,
                           DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) 
    {
        e.Appearance.BackColor = Color.Green;
        e.Appearance.BackColor2 = Color.LightGreen;
    }
    

    见:Customizing Appearances of Individual Rows and Cells

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 2020-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-23
      • 1970-01-01
      相关资源
      最近更新 更多