ClientDataSet + DataSource + DBGridEh<br>在 DataSource 的 OnDataChange 中写:<br>procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField);<br>begin<br> if .... then DBGridEh1.ReadOnly:=true<br> else DBGridEh1.ReadOnly:=false;<br>end;