DevExpress改变GridView的颜色
时间:2011-04-28 来源:菜鸟成长日记
using DevExpress.XtraGrid.Views.Grid; //注册RowStyleChange事件 private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { GridView view = sender as GridView; if (e.RowHandle >= 0) { string category = view.GetRowCellDisplayText(e.RowHandle, view.Columns["Category"]); if (category == "Beverages") { e.Appearance.BackColor = Color.Salmon; e.Appearance.BackColor2 = Color.SeaShell; } }
相关阅读 更多 +
- 系统休眠文件删除后果 如何删除计算机的休眠文件 2025-04-22
- 站群服务器是什么意思 站群服务器的作用 站群服务器和普通服务器的区别 2025-04-22
- jQuery插件有何作用 jQuery插件的使用方法 2025-04-22
- jQuery插件有哪些种类 简单的jQuery插件实例 2025-04-22
-