TMSGrid and Aurelius


What is the recommended way to use TAureliusDataSet and TFMXTMSGrid?

The issue is that I have many Association properties. and for the Grid is display them as GUIDs.

For example, I have the 

property Item: TEntityItem;

in a Entity that I am connecting to the Grid. I need to display the Item.Name. 

How should it be done? there is one problem that this Grid does not let you select the column, nor define the fields at design time, specially using live bindings.

Adding fields manually to the TAD is difficult since I reload the fieldDefs frequently due the changes. (TAureliusDataSet should keep the fields or at least ask if should keep those entered manually)

So, how to display such fields (item.name) in TTMSFMXGRID?

Thank you


I have found either that seems to have issue getting the extended values from TAD.


I have this event on TMSFMXGrid
procedure TViewPDVCaixaItemExcluido.GridItensGetCellData(Sender: TObject; ACol,
  ARow: Integer; var CellString: string);
begin
  inherited;

  if ARow > 0 then
    if (ACol = 4) or (ACol = 5) then
    begin
      CellString := CurrToStrF(GridItens.Floats[ACol, ARow] , ffCurrency, 2);
    end;

end;

Where I can format the value to be displayed.

The column 4 is a "valor" and is a mapped property : extended
The column 5 is "total" and is a read only property (not mapped) to return the qtd*valor.

With a break-point on the getter of each one I see that TMS grid is getting the value as string for the cell, but the Floats cell matrix is getting 0. What is wrong, since it is extended (double). There is some kind of incompatibility between both.

I am trying to use grouping and summary row that calculates the sum of the total column.

Can't you just point to predefined persistent fields? In your first question, you should just create a TStringField named "Item.Name" in dataset, and set the grid to display such field. 

Another question, are the issues you are mentioning only happening with TAureliusDataset, or does it happen with any TDataset?