Class TrDBCheckListBoxUDB

Unit

Declaration

type TrDBCheckListBoxUDB = class(TrDBCheckListBox)

Description

TrDBCheckListBox descendant with possibility to load list of items and values from any SQL command, provide all functions for N:M relationship

Hierarchy

  • TrDBCheckListBox
  • TrDBCheckListBoxUDB

Overview

Methods

Protected procedure Loaded; override;
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Public procedure ReloadItemsList(ReloadValues: boolean);
Public procedure ReloadItemsValue;
Public function GetListField(const FieldName: string): TField; overload;
Public function GetListField(FieldIndex: integer): TField; overload;
Public function GetItemObjectAsInt: integer;
Public function SetActiveItem(ObjectAsInt: integer): integer;

Properties

Published property ListConnection: TConnectionUDB read FListConnection write SetListConnection;
Published property ItemsListSQL: TStrings read FItemsListSQL write SetItemsListSQL;
Published property ItemsListAutoLoad: boolean read FItemsListAutoLoad write FItemsListAutoLoad default true;
Published property ItemsListSQLTryNow: boolean read FItemsListSQLTryNow write SetItemsListSQLTryNow default false;
Published property OnGetItemsListSQL: TGetSQLEvent read FGetItemsListSQL write FGetItemsListSQL;
Published property ItemsValueSQL: TStrings read FItemsValueSQL write SetItemsValueSQL;
Published property ItemsValueSQLTryNow: boolean read FItemsValueSQLTryNow write SetItemsValueSQLTryNow default false;
Published property OnGetItemsValueSQL: TGetSQLEvent read FGetItemsValueSQL write FGetItemsValueSQL;
Published property ItemsListDataSet: TQueryIntList read FItemsListDataSet;
Published property ItemsValueDataSet: TQueryIntList read FItemsValueDataSet;
Published property OnBeforeSaveItemValues: TLoadSaveItemList read FOnBeforeSaveItemValues write FOnBeforeSaveItemValues;
Published property OnItemsValueDataSetEvent: TDataSetEvent read FItemsValueDataSetEvent write SetItemsValueDataSetEvent;

Description

Methods

Protected procedure Loaded; override;
 
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
 
Public procedure ReloadItemsList(ReloadValues: boolean);

open SQL command and refresh list items

Public procedure ReloadItemsValue;

open SQL command and refresh list values = checkboxes

Public function GetListField(const FieldName: string): TField; overload;

return Field from internal Dataset to allow reading of field value from selected record

Public function GetListField(FieldIndex: integer): TField; overload;

return Field from internal Dataset to allow reading of field value from selected record

Public function GetItemObjectAsInt: integer;

return ID value from selected item

Public function SetActiveItem(ObjectAsInt: integer): integer;

set ItemIndex according ID value

Properties

Published property ListConnection: TConnectionUDB read FListConnection write SetListConnection;

define UDB connection

Published property ItemsListSQL: TStrings read FItemsListSQL write SetItemsListSQL;

define SQL command for loading of list items, value of first field is used as N-table ID value, value of 2nd field as N-table listed text

Published property ItemsListAutoLoad: boolean read FItemsListAutoLoad write FItemsListAutoLoad default true;

define whether ReloadItemsList is called automatically after loading

Published property ItemsListSQLTryNow: boolean read FItemsListSQLTryNow write SetItemsListSQLTryNow default false;

try to open ItemsListSQL command in design time

Published property OnGetItemsListSQL: TGetSQLEvent read FGetItemsListSQL write FGetItemsListSQL;

call before opening of ItemsListSQL to allow update command or set WHERE condition

Published property ItemsValueSQL: TStrings read FItemsValueSQL write SetItemsValueSQL;

define SQL command for loading of item values, value of first field is used as M-table ID value, value of 2nd field as N-table ID value

Published property ItemsValueSQLTryNow: boolean read FItemsValueSQLTryNow write SetItemsValueSQLTryNow default false;

try to open ItemsValueSQL command in design time

Published property OnGetItemsValueSQL: TGetSQLEvent read FGetItemsValueSQL write FGetItemsValueSQL;

call before opening of ItemsValueSQL to allow update command or set WHERE condition

Published property ItemsListDataSet: TQueryIntList read FItemsListDataSet;

return internal List Dataset to allow reading of other fields

Published property ItemsValueDataSet: TQueryIntList read FItemsValueDataSet;

return internal Value Dataset to allow reading of other fields

Published property OnBeforeSaveItemValues: TLoadSaveItemList read FOnBeforeSaveItemValues write FOnBeforeSaveItemValues;

define event called before saving of items

Published property OnItemsValueDataSetEvent: TDataSetEvent read FItemsValueDataSetEvent write SetItemsValueDataSetEvent;

define event for internal dataset (BeforeOpen, BeforePost... After... ses TDataSetEventTypes


Generated by PasDoc 0.15.0.