TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel

Post by swierzbicki » Tue 10 Feb 2009 11:35

Hi,

TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel value.

Exemple :

Code: Select all

ADataset.Fieldbyname('MyField').DisplayValue := 'Hello';
VirtualTable.Assign(Adataset);
Showmessage(VirtualTable.Fieldbyname('MyField').DisplayValue); 
will display
'MyField' instead of 'Hello'

Is it a bug ? If not could you implement this in the next TVirtualTable version ?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 11 Feb 2009 12:45

This is not a bug. The Assign method of TVirtualTable component creates only FieldDefs based on fields of the source dataset. TFieldDef class does not have DisplayLabel property. When VirtualTable is opened, fields are created from FieldDefs. No properties are copied directly from fields of the source dataset to fields of VirtualTable.

We'll consider possibility of implementing this functionality in a future TVirtualTable version.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Wed 11 Feb 2009 14:38

Thank you for the answer, I'm really waiting for such improvement (it will be great to add Master / detail feature too ;) )

Post Reply