如何使网格列单元格在 Dev-Express 中只读?

How can i make a grid column cell to read only in Dev-Express?

如果我的条件为假,我需要将网格单元设为只读。在 devexpress gridControl.

试试这个并根据要求更改条件

protected void ASPxGridView1_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewEditorEventArgs e) {
    if (ASPxGridView1.IsNewRowEditing) return;
    if (e.Column.FieldName == "UnitPrice")
             if (ASPxGridView1.GetRowValues(....) == ....)
                   e.Editor.ReadOnly = true;
}