【发布时间】:2014-01-23 04:24:16
【问题描述】:
我按照这篇帖子Create BandedGridView for DevExpress XtraGrid 动态生成乐队,但我需要更改单元格的颜色,但 RowCellStyle 事件不会触发
【问题讨论】:
-
您是否将事件与事件处理程序绑定?意味着订阅了这些事件?? GridView.RowCellStyle += someHandler
-
我尝试这样做 DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs RowStyleEventArgs = default(DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs); bandedGridView1_RowCellStyle(bandedGridView1, RowStyleEventArgs);但是当它触发事件时,我在事件中有此代码,但是当我尝试访问 e.ColumnName if (e.Column.Name == "COLUM NAME") { e.Appearance.BackColor = 颜色.深天蓝; e.Appearance.BackColor2 = 颜色.LightCyan; }
标签: c# visual-studio devexpress