TTMSFNCDataGrid + TTMSFNCDataGridDatabaseAdapter - changing field values at dataset level

Hi!
When I modify the value of a field in the DataGrid, the change "is seen outside the Grid", and even the field's OnChange event is called.
If I modify the field value outside the grid, for example with a DBEdit, the new value is also replicated in the corresponding cell.

But if within the OnChange of a field I change the content of another field, this is not being reflected in the DataGrid.

Example:

procedure TMyForm.ValorChange(Sender: TField);
begin
  try
    Sender.DataSet.FieldByName('Val80').AsFloat := Round(Sender.AsFloat * 0.8);
  except
    Sender.DataSet.FieldByName('Val80').Clear;
  end;
end;

The event fires, but the new value of "Val80" is not being updated in the corresponding DataGrid cell.

I've tested it here and can succesfully change the value. Can you replicate this with one of our demos?

Use biolife clientdataset example, with fields previously defined.

For the length in cm, assign this OnChange event:

procedure TForm130.ClientDataSet1LengthcmChange(Sender: TField);
begin
  try
    Sender.DataSet.FieldByName('Length_In').AsFloat := Sender.AsFloat / 2.54;
  except
    Sender.DataSet.FieldByName('Length_In').Clear;
  end;
end;

The new value of Length_In will be displayed only after you post the record.

If you put a DBGrid or a TDBEdit , the update will display immediately.

Thanks for the additional information, we have fixed the issue. Next version of TMS FNC UI Pack will address this. Be aware that we just pushed out a version, so it will not contain the fix yet. Thanks for reporting.

BTW, with Subscription Manager we had an icon click that showed what has been fixed, improved or added. Is this info available through Smart Setup or Dashboard?

Hi,

Good suggestion, I'll pass the request to the responsible developer :slight_smile: