Criar campos em runtime no ClientDataSet
Preciso criar vários campos em runtime no ClientDataSet, como faço?
Biohazard
Curtidas 0
Respostas
Kotho
04/04/2005
Eu uso assim:
ClientDataSet1 := TCustomClientDataSet.Create(Self); with ClientDataSet1 do begin with FieldDefs.AddFieldDef do begin DataType := ftString; Name := ´Campo´; end; with FieldDefs.AddFieldDef do begin DataType := ftString; Name := ´Valor´; end; CreateDataSet; end;
GOSTEI 0