来源:
I test these code with 1.10.0.1456,maybe work for you.
write code in UniDBGrid's OnSetCellValue event
procedure TMainForm.UniDBGrid1SetCellValue(Sender: TObject; ACol, ARow: Integer; AField: TField; var Value: Variant);begin self.UniDBGrid1.DataSource.DataSet.Edit; self.UniDBGrid1.DataSource.DataSet.FieldByName(self.UniDBGrid1.Columns.Items[Acol].FieldName).Value:=Value; self.UniDBGrid1.DataSource.DataSet.Post;end;