mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-04 10:19:52 +01:00
IDEIntf: ListDataSourceFields
git-svn-id: trunk@44308 -
This commit is contained in:
parent
ea1e624deb
commit
8497743a6a
@ -51,10 +51,11 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function GetFieldDefsLookupRoot(APersistent: TPersistent): TPersistent;
|
function GetFieldDefsLookupRoot(APersistent: TPersistent): TPersistent;
|
||||||
|
procedure ListDataSourceFields(DataSource: TDataSource; List: TStrings);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure LoadDataSourceFields(DataSource: TDataSource; List: TStrings);
|
procedure ListDataSourceFields(DataSource: TDataSource; List: TStrings);
|
||||||
var
|
var
|
||||||
DataSet: TDataSet;
|
DataSet: TDataSet;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -114,7 +115,7 @@ var
|
|||||||
DataSource: TDataSource;
|
DataSource: TDataSource;
|
||||||
begin
|
begin
|
||||||
DataSource := GetObjectProp(GetComponent(0), 'DataSource') as TDataSource;
|
DataSource := GetObjectProp(GetComponent(0), 'DataSource') as TDataSource;
|
||||||
LoadDataSourceFields(DataSource, Values);
|
ListDataSourceFields(DataSource, Values);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TDBGridFieldProperty }
|
{ TDBGridFieldProperty }
|
||||||
@ -128,7 +129,7 @@ begin
|
|||||||
if not (Column is TColumn) then exit;
|
if not (Column is TColumn) then exit;
|
||||||
Grid:=TdbGrid(Column.Grid);
|
Grid:=TdbGrid(Column.Grid);
|
||||||
if not (Grid is TdbGrid) then exit;
|
if not (Grid is TdbGrid) then exit;
|
||||||
LoadDataSourceFields(Grid.DataSource, Values);
|
ListDataSourceFields(Grid.DataSource, Values);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TDBGridComponentEditor }
|
{ TDBGridComponentEditor }
|
||||||
@ -161,7 +162,7 @@ var
|
|||||||
DataSource: TDataSource;
|
DataSource: TDataSource;
|
||||||
begin
|
begin
|
||||||
DataSource := GetObjectProp(GetComponent(0), 'ListSource') as TDataSource;
|
DataSource := GetObjectProp(GetComponent(0), 'ListSource') as TDataSource;
|
||||||
LoadDataSourceFields(DataSource, Values);
|
ListDataSourceFields(DataSource, Values);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user