devExpress

dev 控件,在gridcontrol中如何实现对满足条件的某一行进行涂色

时间:2013-10-17 22:31:58  作者:WPF之家  来源:http://www.wpf123.com/  查看:4084  评论:0
内容摘要:private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { int hand = e.RowHan...
private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            int hand = e.RowHandle;
            if (hand < 0) return;
            DataRow dr = this.gridView1.GetDataRow(hand);
            if (dr== null) return;
            if (“满足条件”)
            {
                e.Appearance.ForeColor = Color.Red;// 改变行字体颜色
                e.Appearance.BackColor = Color.Red;// 改变行背景颜色
                e.Appearance.BackColor2 = Color.Blue;// 添加渐变颜色
                //……

                //根据需求

            }
        }

标签:控件 如何 实现 满足 条件 

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。本文出自“wpf之家”,请务必保留此出处:http://www.wpf123.com

相关评论
Copyright © 2009-2014 WPF之家(http://www.wpf123.com/) All rights reserved
 Powered by WPF之家
鄂ICP备13006396号