【DevExpress】gridControl常用属性设置
【DevExpress】GridControl常用属性设置
1.隐藏最上面的GroupPanel
gridView1.OptionsView.ShowGroupPanel=false;
2.读写拷贝权限设置
只读不可拷贝:
gridView1.ColumnViewOptionsBehavior.Editable = False
只读可拷贝:
gridView1.ColumnViewOptionsBehavior.Editable = True
gridView1.OptionsColumn.AllowEdit = True
gridView1.OptionsColumn.ReadOnly = True
可编辑:
gridView1.ColumnViewOptionsBehavior.Editable = True
gridView1.OptionsColumn.AllowEdit = True
gridView1.OptionsColumn.ReadOnly = False
3.设置隔行变色
首先设置显示隔行变色,步骤:
gridView1.OptionsView-->EnableAppearanceEvenRow-->true
gridView1.OptionsView-->EnableAppearanceOddRow-->true
然后设置奇数行和偶数行样式颜色
gridView1.Appearance-->EvenRow
gridView1.Appearance-->OddRow
设置焦点行颜色
gridView1.Appearance-->FoucsedRow