You've already forked lazarus-ccr
jvcllaz: Add new component TDBLookupTreeView with demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6870 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -48,6 +48,19 @@ Usage:
|
||||
- The text to be displayed as node text is taken from field "ItemField"
|
||||
- Optionally, there can ba an "IconField" from which the icon index into the
|
||||
ImageList is taken.
|
||||
|
||||
From http://wiki.delphi-jedi.org/wiki/JVCL_Help:TJvDBTreeView:
|
||||
- MasterField: is equivalent to the absoluteIndex of the TreeView, a unique
|
||||
ID for each TreeNode or record in the table.
|
||||
- DetailField: is the hierachical link to the parent item, a foreing key
|
||||
to the master filed in a self relation table
|
||||
- ItemField: is the field that contain the display name or the caption of
|
||||
a treeNode.
|
||||
- IconField: is a integer field that point to a image index on a TImageList
|
||||
object that contains the icons for the treeView.
|
||||
- StartMasterValue: is the begining level to start build the TreeView,
|
||||
0 = start from the root itens, 1 = start from the second level,
|
||||
and so on.
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
@ -201,9 +214,6 @@ type
|
||||
property MasterValue: Variant read FMasterValue;
|
||||
end;
|
||||
|
||||
{$IFDEF RTL230_UP}
|
||||
[ComponentPlatformsAttribute(pidWin32 or pidWin64)]
|
||||
{$ENDIF RTL230_UP}
|
||||
TJvDBTreeView = class(TJvCustomDBTreeView)
|
||||
published
|
||||
property DataSource;
|
||||
|
17
components/jvcllaz/run/JvDB/jvdbconst.pas
Normal file
17
components/jvcllaz/run/JvDB/jvdbconst.pas
Normal file
@ -0,0 +1,17 @@
|
||||
unit JvDBConst;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
resourcestring
|
||||
SPropDefByLookup = 'Property already defined by lookup field.';
|
||||
SDataSourceFixed = 'Operation is not allowed with DataSource.';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
1753
components/jvcllaz/run/JvDB/jvdblookuptreeview.pas
Normal file
1753
components/jvcllaz/run/JvDB/jvdblookuptreeview.pas
Normal file
File diff suppressed because it is too large
Load Diff
@ -132,6 +132,9 @@ procedure CheckRequiredField(Field: TField);
|
||||
procedure CheckRequiredFields(const Fields: array of TField);
|
||||
procedure GotoBookmarkEx(DataSet: TDataSet; const Bookmark: TBookmark; Mode: TResyncMode = [rmExact, rmCenter]; ForceScrollEvents: Boolean = False);
|
||||
|
||||
function GetFieldProperty(ADataSet: TDataSet; AControl: TComponent;
|
||||
const AFieldName: string): TField;
|
||||
|
||||
{ SQL expressions }
|
||||
|
||||
function DateToSQL(Value: TDateTime): string;
|
||||
@ -264,6 +267,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetFieldProperty(ADataSet: TDataSet; AControl: TComponent;
|
||||
const AFieldName: string): TField;
|
||||
begin
|
||||
Result := ADataSet.FindField(AFieldName);
|
||||
if Result = nil then
|
||||
DatabaseErrorFmt(SFieldNotFound, [AFieldName], AControl);
|
||||
end;
|
||||
|
||||
|
||||
{ Refresh Query procedure }
|
||||
|
||||
procedure RefreshQuery(Query: TDataSet);
|
||||
|
Reference in New Issue
Block a user