procedure TFormUser.tvUserEditing(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem; var AAllow: Boolean); begin //如果第三列值为True,则第4列不能修改 if (tvUser.Controller.FocusedRecord.Values[2] = True) and (AItem.Index = 4) then AAllow := False else AAllow := True; end;