Page 1 of 1

add and delete column at runtime

Posted: Wed 22 Apr 2009 16:36
by fcodebue
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

Posted: Thu 23 Apr 2009 08:22
by Plash
We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem.