只能说是方法procedure TForm1.DBGrid1CellClick(Column: TColumn);begin if (DBGrid1.DataSource <> nil) and (DBGrid1.DataSource.DataSet <> nil) and DBGrid1.DataSource.DataSet.Active then begin if DBGrid1.Fields[2].Value = '度假村' then // 你要去掉编辑的条件 begin if dgEditing in DBGrid1.Options then DBGrid1.Options := DBGrid1.Options - [dgEditing]; end else if not (dgEditing in DBGrid1.Options) then DBGrid1.Options := DBGrid1.Options + [dgEditing]; if dgEditing in DBGrid1.Options then Caption := 'Edit is Enabled' else Caption := 'Edit is not Enabled'; end;end;procedure TForm1.DBGrid1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);begin if Key in [VK_DOWN, VK_UP] then DBGrid1CellClick(nil);end;