我需要将Grid Cell设为只读如果我的条件是假的。在devexpress gridControl中。
答案 0 :(得分:1)
尝试此操作并根据要求更改条件
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;
}