add and delete column at runtime

add and delete column at runtime

Postby fcodebue » Wed 22 Apr 2009 16:36

I create my vt at runtime with these istructions

vt_maga_tvg.AddField('FIELD01', ftString, 20);
vt_maga_tvg.AddField('FIELD02', ftFloat, 0);

when I press a button (change view button) I want to clear grid connected to the vt and vt itself.
So I do:

vt_maga_tvg.DeleteFields;
vt_maga_tvg.Refresh;

and I add other fields

vt_maga_tvg.AddField('FIELD04', ftString, 20);
vt_maga_tvg.AddField('FIELD05', ftFloat, 0);


this does'nt create any problem, but if I add a field with a name of a field already create ( and deleted)

vt_maga_tvg.AddField('FIELD02', ftString, 20);

vt raise an error
fcodebue
 
Posts: 5
Joined: Thu 13 Nov 2008 13:12

Postby Plash » Thu 23 Apr 2009 08:22

We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to VirtualDAC