I'm trying to write a component that inherits from TClientDataset. On the create of the component in design time I want to instantiate a list of common fields that are used within my framework. The code below will execute without errors and the field will appear at run time but not design time. Can anyone help me? I'm sure its something trivial!
{ InheritedClientDataset }
constructor InheritedClientDataset.Create(AOwner: TComponent);
var
Field : TField;
begin
inherited;
Field := TField.Create(self);
Field.Name := 'ATestField';
Field.FieldName := 'Test';
Field.SetFieldType(ftInteger);
//Field.DataType := ftInteger;
Field.Size := 0;
Field.FieldKind := fkData;
self.Fields.Add(Field);
end;