DEV控件属性

1.设某一列文字和标题局中显示 
gridView1.Columns[0].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridView1.Columns[0].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

2.如何解决单击记录整行选中的问题

View->OptionsBehavior->EditorShowMode 设置为:Click

3.如何让行只能选择而不能编辑(或编辑某一单元格)

(1)、View->OptionsBehavior->EditorShowMode 设置为:Click

(2)、View->OptionsBehavior->Editable 设置为:false

4.数据只读
gridView1.OptionsBehavior.Editable=false;

原文地址:https://www.cnblogs.com/zhaofangyan/p/10101888.html