Class TrDBMemoGrid

Unit

Declaration

type TrDBMemoGrid = class(TrStringGridEd)

Description

enhanced TrStringGridEd component which provides function for editing content of db memo field in grid form

Hierarchy

Overview

Methods

Public procedure LoadFromField;
Public procedure StoreToField;
Public function SetValue(Col, Row: Integer; const Value: string): boolean;
Public function GetValue(Col, Row: Integer): string;
Public function DeleteLine(Index: Integer): boolean;
Public function MoveLine(Index: Integer; Delta: Integer): boolean;
Public function CopyTable(const Separator: string): string;
Public function InsertTable(const Values, Separator: string): boolean;
Public function AppendTable(const Values, Separator: string): boolean;
Public procedure SelectRow(ARow: Integer; Selected: boolean);
Public function IsRowSelected(ARow: Integer): boolean;
Public function SelectedRowCount: Integer;
Public procedure SelectCol(ACol: Integer; Selected: boolean);
Public function IsColSelected(ACol: Integer): boolean;
Public function SelectedColCount: Integer;
Public procedure SelectOneCell(ARow, ACol: Integer; Selected: boolean);
Public function IsCellSelected(ARow, ACol: Integer): boolean;
Public function SelectedCellCount: Integer;
Public function GetSelection(const ValueSeparator, LineSeparator: string): string;
Public function GetActiveLine(const ValueSeparator: string): string;
Public function SelectionExists: boolean;

Properties

Published property DataField: string read GetDataField write SetDataField;
Published property DataSource: TDataSource read GetDataSource write SetDataSource;
Published property ReadOnly: boolean read FReadOnly write FReadOnly default false;
Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;
Published property ColTitles: TStrings read FColTitles write SetColTitles;
Published property ColSeparator: string read FColSeparator write SetColSeparator;
Published property EditInfoChar: string read FEditInfoChar write FEditInfoChar;
Published property VisibleAll: boolean read FVisibleAll write SetVisibleAll;
Published property ReadOnlyColor: TColor read FReadOnlyColor write FReadOnlyColor;
Published property MemoGridOpt: TMemoGridOpt read FMemoGridOpt write SetMemoGridOpt;
Published property MemoGridSelections: TMemoGridSelections read FMemoGridSelections write FMemoGridSelections;
Published property OnMemoCheckFormat: TMemoCheckFormat read FMemoCheckFormat write FMemoCheckFormat;
Published property SelectedColor: TColor read FSelectedColor write FSelectedColor;
Published property NoNewLines: boolean read FNoNewLines write FNoNewLines;
Published property MemoGridOptsEx: TMemoGridOptsEx read FMemoGridOptsEx write FMemoGridOptsEx;
Published property RowFilterColumn: Integer read FRowFilterColumn write SetRowFilterColumn default 0;
Published property RowFilterValues: TStrings read FRowFilterValues write SetRowFilterValues;

Description

Methods

Public procedure LoadFromField;

reload values from database memo field to grid

Public procedure StoreToField;

store values from grid to database memo field

Public function SetValue(Col, Row: Integer; const Value: string): boolean;

set one value of grid, dataset has to be in editing mode

Public function GetValue(Col, Row: Integer): string;

get one value of grid

Public function DeleteLine(Index: Integer): boolean;

delete one line, dataset has to be in editing mode

Public function MoveLine(Index: Integer; Delta: Integer): boolean;

move one line, dataset has to be in editing mode

Public function CopyTable(const Separator: string): string;

copy whole table, result can be inserted to clipboard or to text

Public function InsertTable(const Values, Separator: string): boolean;

insert whole table, values are separated by separator

Public function AppendTable(const Values, Separator: string): boolean;

append whole table, values are separated by separator

Public procedure SelectRow(ARow: Integer; Selected: boolean);

select or deselect one row

Public function IsRowSelected(ARow: Integer): boolean;

indicate whether row is selected

Public function SelectedRowCount: Integer;

returns count of selected rows

Public procedure SelectCol(ACol: Integer; Selected: boolean);

select or deselect one column

Public function IsColSelected(ACol: Integer): boolean;

indicate whether column is selected

Public function SelectedColCount: Integer;

returns count of selected columns

Public procedure SelectOneCell(ARow, ACol: Integer; Selected: boolean);

select or deselect one cell

Public function IsCellSelected(ARow, ACol: Integer): boolean;

indicate whether cell is selected

Public function SelectedCellCount: Integer;

returns count of selected cells

Public function GetSelection(const ValueSeparator, LineSeparator: string): string;

returns content of selection

Public function GetActiveLine(const ValueSeparator: string): string;

returns content of line

Public function SelectionExists: boolean;

indicates whether selection exists

Properties

Published property DataField: string read GetDataField write SetDataField;
 
Published property DataSource: TDataSource read GetDataSource write SetDataSource;
 
Published property ReadOnly: boolean read FReadOnly write FReadOnly default false;

defines whether data is in read only mode - no modification can be done

Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;

defines bounded label

Published property ColTitles: TStrings read FColTitles write SetColTitles;

defines titles of columns

Published property ColSeparator: string read FColSeparator write SetColSeparator;

defines separator for values in one row

Published property EditInfoChar: string read FEditInfoChar write FEditInfoChar;

defines char in cell 0,0 if editing

Published property VisibleAll: boolean read FVisibleAll write SetVisibleAll;

defines visibility of all component including bound label, used instead of property Visible

Published property ReadOnlyColor: TColor read FReadOnlyColor write FReadOnlyColor;

defines color of memo when dataset is not editing

Published property MemoGridOpt: TMemoGridOpt read FMemoGridOpt write SetMemoGridOpt;

defines showing of grid, memo or auto according data structure

Published property MemoGridSelections: TMemoGridSelections read FMemoGridSelections write FMemoGridSelections;

defines what can be selected - rows, columns, cells

Published property OnMemoCheckFormat: TMemoCheckFormat read FMemoCheckFormat write FMemoCheckFormat;

event for user defined check of data format

Published property SelectedColor: TColor read FSelectedColor write FSelectedColor;

defines background color for selected cells

Published property NoNewLines: boolean read FNoNewLines write FNoNewLines;

prohibit adding of new lines

Published property MemoGridOptsEx: TMemoGridOptsEx read FMemoGridOptsEx write FMemoGridOptsEx;

set of extended options - enable deleting of rows if readonly

Published property RowFilterColumn: Integer read FRowFilterColumn write SetRowFilterColumn default 0;

column index which is compared for filtered rows (filter is working only for ReadOnly memogrid)

Published property RowFilterValues: TStrings read FRowFilterValues write SetRowFilterValues;

displayed values for filtered rows (filter is working only for ReadOnly memogrid)


Generated by PasDoc 0.15.0.