TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel

TVirtualTable.Assign(ADataset) doesn't retrieve DisplayLabel

Postby 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 ?
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby 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.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby 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 ;) )
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59


Return to VirtualDAC