add and delete column at runtime

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
fcodebue
Posts: 5
Joined: Thu 13 Nov 2008 13:12

add and delete column at runtime

Post by 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

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

Post by 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.

Post Reply