Class TImpGridColumns (unit Impstringgrid) |
Inherits from
TCollection
constructor Create(Grid: TImpStringGrid; ColumnClass: TImpColumnClass);
- TImpGridColumns
function Add: TImpColumn;
procedure LoadFromFile(const Filename: string);
and not (Items[0] is TPassthroughColumn));
procedure LoadFromStream(S: TStream);
procedure RebuildColumns;
procedure RestoreDefaults;
Wrapper := TImpColumnsWrapper.
procedure SaveToFile(const Filename: string);
if Assigned(FGrid) and Assigned(FGrid.
procedure SaveToStream(S: TStream);
function GetOwner: TPersistent;
procedure Update(Item: TCollectionItem);
function GetCount:Integer;
function GeTImpColumn(Index: Integer): TImpColumn;
function GetState: TImpGridColumnsState;
procedure SeTImpColumn(Index: Integer; Value: TImpColumn);
procedure SetState(NewState: TImpGridColumnsState);
property Count : integer
property Grid : TImpStringGrid
property Items : TImpColumn
property State : TImpGridColumnsState
FGrid : TImpStringGrid;
constructor Create(Grid: TImpStringGrid; ColumnClass: TImpColumnClass);
TImpGridColumns
function Add: TImpColumn;
procedure LoadFromFile(const Filename: string);
and not (Items[0] is TPassthroughColumn));
procedure LoadFromStream(S: TStream);
procedure RebuildColumns;
procedure RestoreDefaults;
Wrapper := TImpColumnsWrapper.Create(nil);
try
Wrapper.Columns := FGrid.CreateColumns;
S.ReadComponent(Wrapper);
Assign(Wrapper.Columns);
finally
Wrapper.Columns.Free;
Wrapper.Free;
end;
procedure SaveToFile(const Filename: string);
if Assigned(FGrid) and Assigned(FGrid.DataSource) and
Assigned(FGrid.Datasource.Dataset) then
begin
FGrid.BeginLayout;
try
Clear;
with FGrid.Datasource.Dataset do
for I := 0 to FieldCount-1 do
Add.FieldName := Fields[I].FieldName
finally
FGrid.EndLayout;
end
end
else
Clear;
procedure SaveToStream(S: TStream);
function GetOwner: TPersistent;
procedure Update(Item: TCollectionItem);
function GetCount:Integer;
function GeTImpColumn(Index: Integer): TImpColumn;
function GetState: TImpGridColumnsState;
procedure SeTImpColumn(Index: Integer; Value: TImpColumn);
procedure SetState(NewState: TImpGridColumnsState);
property Count : integer
property Grid : TImpStringGrid
property Items : TImpColumn
property State : TImpGridColumnsState
FGrid : TImpStringGrid;