Class TComboBoxUDB

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TComboBoxUDB = class(TrComboBoxEx)

Description

TComboBox descendant load list of items from any SQL command

Hierarchy

  • TrComboBoxEx
  • TComboBoxUDB

Overview

Methods

Protected procedure Loaded; override;
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected procedure DoEnter; override;
Protected procedure KeyDown(var Key: Word; Shift: TShiftState); override;
Public procedure ReloadItems;
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

Public property ListDataSet: TQueryIntList read FListDataSet;
Published property ListSQL: TStrings read FListSQL write SetListSQL;
Published property ListConnection: TConnectionUDB read FListConnection write SetListConnection;
Published property ListAutoLoad: boolean read FListAutoLoad write FListAutoLoad default true;
Published property ListSQLTryNow: boolean read FListSQLTryNow write SetListSQLTryNow default false;
Published property OnGetListSQL: TGetSQLEvent read FGetListSQL write FGetListSQL;
Published property DelKeyForNullValue: boolean read FDelKeyForNullValue write FDelKeyForNullValue default false;
Published property OnListDataSetEvent: TDataSetEvent read FListDataSetEvent write SetListDataSetEvent;

Description

Methods

Protected procedure Loaded; override;
 
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
 
Protected procedure DoEnter; override;
 
Protected procedure KeyDown(var Key: Word; Shift: TShiftState); override;
 
Public procedure ReloadItems;

open SQL command and refresh list items

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 item (record)

Public function GetItemObjectAsInt: integer;

return ID value from selected item

Public function SetActiveItem(ObjectAsInt: integer): integer;

set ItemIndex according ID value

Properties

Public property ListDataSet: TQueryIntList read FListDataSet;

return internal Dataset to allow reading of other fields

Published property ListSQL: TStrings read FListSQL write SetListSQL;

define SQL command, value of first field is used as list text value, value of 2nd field is used as Object value (must be integer)

Published property ListConnection: TConnectionUDB read FListConnection write SetListConnection;

define UDB connection

Published property ListAutoLoad: boolean read FListAutoLoad write FListAutoLoad default true;

define whether ReloadItems is called automatically after loading

Published property ListSQLTryNow: boolean read FListSQLTryNow write SetListSQLTryNow default false;

try to open SQL command in design time

Published property OnGetListSQL: TGetSQLEvent read FGetListSQL write FGetListSQL;

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

Published property DelKeyForNullValue: boolean read FDelKeyForNullValue write FDelKeyForNullValue default false;

define whether DEL key set null value

Published property OnListDataSetEvent: TDataSetEvent read FListDataSetEvent write SetListDataSetEvent;

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


Generated by PasDoc 0.13.0 on 2017-06-17 14:57:14