本文主要是介绍Dev-Gridview中根据条件改变行颜色及单元颜色,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Dev-Gridview中根据条件改变行颜色及单元颜色
//改变行的效果private void <span style="color:#ff0000;">gridView2_RowStyle</span>(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e){DevExpress.Utils.AppearanceDefault appNotPass1 = new DevExpress.Utils.AppearanceDefault(Color.Black, Color.Salmon, Color.Empty, Color.SeaShell, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);DevExpress.Utils.AppearanceDefault appNotPass2 = new DevExpress.Utils.AppearanceDefault(Color.Black, Color.Yellow, Color.Empty, Color.SeaShell, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);DataRow dr = gridView2.GetDataRow(e.RowHandle);if (dr != null){if (dr["sex"].ToString() == "女" && dr["birthday1"].ToString().Trim() == "55")De
这篇关于Dev-Gridview中根据条件改变行颜色及单元颜色的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!