Page 1 of 1

TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel

Posted: Tue 10 Feb 2009 11:35
by swierzbicki
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 ?

Posted: Wed 11 Feb 2009 12:45
by Plash
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.

Posted: Wed 11 Feb 2009 14:38
by swierzbicki
Thank you for the answer, I'm really waiting for such improvement (it will be great to add Master / detail feature too ;) )