DevExpress sets the cell to be uneditable, and selects a cell to select a row, the purpose is to only display data, and does not provide modification functions:
DevexpressGridControl prohibits clicking on the cell to modify
- Set the Editable option of GridView.OptionsBehavior to False. In this case, the entire Grid is read-only.
- Change the ReadOnly or AllowEdit properties of the specified column.
- Use the ViewingEditor event to prohibit cell editing through the e.Cancel parameter of the event.
- Select the cell, select a row:
foreach (GridColumn item in gridView1.Columns)
{
item.OptionsColumn.ReadOnly = true;
item.OptionsColumn.AllowEdit = false;
//禁止单元格获取焦点
item.OptionsColumn.AllowFocus = false;
}