开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 3023|回复: 0

GridControl 更变行显示样式

[复制链接]

0

精华

100

贡献

33

赞扬

帖子
132
软币
3320
在线时间
53 小时
注册时间
2013-8-31
发表于 2013-9-1 14:44:22 | 显示全部楼层 |阅读模式
        /// <summary>
        /// 更变显示样式
        /// </summary>
        private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        {
            if (e.Column.FieldName == "Enabled")
            {
                GridCellInfo GridCellInfo = e.Cell as GridCellInfo;
                if (GridCellInfo.IsDataCell && double.Parse(GridCellInfo.CellValue.ToString()) == 0)
                    e.Appearance.BackColor = Color.Yellow;//当会员已停用时用黄色显示
            }
        }

评分

参与人数 1贡献 +1 赞扬 +1 收起 理由
羽叶 + 1 + 1 感谢分享

查看全部评分

回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-5-5 15:58

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表