我怎样才能改变一个排在GridView的DevExpress的背景色? [英] How can I change the backcolor of a row in a DevExpress GridView?

查看:425
本文介绍了我怎样才能改变一个排在GridView的DevExpress的背景色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的DevExpress GridView控件在我的形式,我需要改变一些行颜色因一个布尔值。

I have a DevExpress GridView in my form and I need to change some rows color due to a boolean value.

那是什么让我改变属性行??

What is the property that allows me to change the backcolor of a row ??

推荐答案

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

You can change the row's color gradient in the RowStyle event handler:

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

请参阅:的个别行和单元格

这篇关于我怎样才能改变一个排在GridView的DevExpress的背景色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆