DevExpress 中 GridControl 的属性设置
1. 隐藏最上面的 GroupPanel
gridView1.OptionsView.ShowGroupPanel=false;
2. 得到当前选定记录某字段的值
sValue=Table.Rows[gridView1.FocusedRowHandle][FieldName].ToString();
3. 数据只读
gridView1.OptionsBehavior.Editable=false;
4.不显示 MasterDetailView
gridView1.OptionsDetail.EnableMasterViewMode=false;
5.修改最上面的 GroupPanel 内容
gridView1.GroupPanelText="CSDN";
6.数据绑定:
FieldName --数据库的字段名称
7.读写拷贝权限设置
ColumnView.Editable
This property returns a value of the ColumnViewOptionsBehavior.Editable option
不可写
ColumnViewOptionsBehavior.Editable
Gets or sets whether end users are allowed to invoke cell editors
可读可写
OptionsColumn.AllowEdit
Gets or sets whether end users are allowed to invoke editors for the column's cells.
可读可写
只有 ColumnViewOptionsBehavior.Editable=True 设置 OptionsColumnAllowEdit 才有意义。
OptionsColumn.ReadOnly
Gets or sets whether end-users are prevented from editing the column's cell values.
可读可写
只读不可拷贝:4444
ColumnViewOptionsBehavior.Editable = False
只读可拷贝:
ColumnViewOptionsBehavior.Editable = True
OptionsColumn.AllowEdit = True
- 1
- 2
- 3
- 4
- 5
- 6
前往页