You've already forked lazarus-ccr
RxFPC:fix new style filter for work with ZEOS
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5841 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.ico
Normal file
BIN
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
88
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lpi
Normal file
88
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lpi
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="10"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<Title Value="project1"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<VersionInfo>
|
||||||
|
<StringTable ProductVersion=""/>
|
||||||
|
</VersionInfo>
|
||||||
|
<BuildModes Count="1">
|
||||||
|
<Item1 Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<local>
|
||||||
|
<FormatVersion Value="1"/>
|
||||||
|
</local>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages Count="5">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="rx_sort_zeos"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<PackageName Value="rxnew"/>
|
||||||
|
</Item3>
|
||||||
|
<Item4>
|
||||||
|
<PackageName Value="zcomponent"/>
|
||||||
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item5>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units Count="2">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
</Unit1>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="project1"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="3">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item3>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
21
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lpr
Normal file
21
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
program project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, zcomponent, Unit1, rxnew
|
||||||
|
{ you can add units after this };
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
RequireDerivedFormResource:=True;
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
101
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lps
Normal file
101
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.lps
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<Version Value="10"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units Count="4">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
<TopLine Value="21"/>
|
||||||
|
<CursorPos Y="52"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="3892"/>
|
||||||
|
<CursorPos Y="3800"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||||
|
<UnitName Value="RxDBGrid_PopUpFilterUnit"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="247"/>
|
||||||
|
<CursorPos X="48" Y="279"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit3>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="13" HistoryIndex="12">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="39" Column="24" TopLine="8"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="40" Column="24" TopLine="8"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="41" Column="24" TopLine="8"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="42" Column="24" TopLine="8"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="45" Column="24" TopLine="11"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="51" Column="5" TopLine="21"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="52" TopLine="21"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="5337" Column="20" TopLine="5316"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="811" Column="15" TopLine="795"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="5339" TopLine="5306"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||||
|
<Caret Line="279" Column="48" TopLine="247"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||||
|
<Caret Line="5341" TopLine="5179"/>
|
||||||
|
</Position13>
|
||||||
|
</JumpHistory>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
BIN
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.res
Normal file
BIN
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/project1.res
Normal file
Binary file not shown.
204
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/unit1.lfm
Normal file
204
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/unit1.lfm
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 684
|
||||||
|
Height = 486
|
||||||
|
Top = 345
|
||||||
|
Width = 741
|
||||||
|
Caption = 'Form1'
|
||||||
|
ClientHeight = 486
|
||||||
|
ClientWidth = 741
|
||||||
|
OnCreate = FormCreate
|
||||||
|
LCLVersion = '1.9.0.0'
|
||||||
|
object RxDBGrid1: TRxDBGrid
|
||||||
|
Left = 0
|
||||||
|
Height = 486
|
||||||
|
Top = 0
|
||||||
|
Width = 741
|
||||||
|
ColumnDefValues.BlobText = '(данные)'
|
||||||
|
TitleButtons = False
|
||||||
|
AutoSort = True
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'DEPT_NO'
|
||||||
|
Width = 70
|
||||||
|
FieldName = 'DEPT_NO'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Footers = <>
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'DEPARTMENT'
|
||||||
|
Width = 250
|
||||||
|
FieldName = 'DEPARTMENT'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Footers = <>
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Title.Alignment = taCenter
|
||||||
|
Title.Orientation = toHorizontal
|
||||||
|
Title.Caption = 'LOCATION'
|
||||||
|
Width = 250
|
||||||
|
FieldName = 'LOCATION'
|
||||||
|
EditButtons = <>
|
||||||
|
Filter.DropDownRows = 0
|
||||||
|
Filter.EmptyValue = '(Пусто)'
|
||||||
|
Filter.AllValue = '(Все значения)'
|
||||||
|
Filter.EmptyFont.Style = [fsItalic]
|
||||||
|
Filter.ItemIndex = -1
|
||||||
|
Filter.Style = rxfstDialog
|
||||||
|
Footers = <>
|
||||||
|
end>
|
||||||
|
KeyStrokes = <
|
||||||
|
item
|
||||||
|
Command = rxgcShowFindDlg
|
||||||
|
ShortCut = 16454
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowColumnsDlg
|
||||||
|
ShortCut = 16471
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowFilterDlg
|
||||||
|
ShortCut = 16468
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowSortDlg
|
||||||
|
ShortCut = 16467
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowQuickFilter
|
||||||
|
ShortCut = 16465
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcHideQuickFilter
|
||||||
|
ShortCut = 16456
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcSelectAll
|
||||||
|
ShortCut = 16449
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcDeSelectAll
|
||||||
|
ShortCut = 16429
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcInvertSelection
|
||||||
|
ShortCut = 16426
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcOptimizeColumnsWidth
|
||||||
|
ShortCut = 16427
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcCopyCellValue
|
||||||
|
ShortCut = 16451
|
||||||
|
Enabled = True
|
||||||
|
end>
|
||||||
|
FooterOptions.DrawFullLine = False
|
||||||
|
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||||
|
SearchOptions.FromStart = False
|
||||||
|
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgDblClickOptimizeColWidth, rdgFilter, rdgAllowQuickSearch, rdgAllowQuickFilter, rdgAllowFilterForm, rdgAllowSortForm, rdgAllowToolMenu]
|
||||||
|
Align = alClient
|
||||||
|
Color = clWindow
|
||||||
|
DrawFullLine = False
|
||||||
|
FocusColor = clRed
|
||||||
|
SelectedColor = clHighlight
|
||||||
|
GridLineStyle = psSolid
|
||||||
|
DataSource = DataSource1
|
||||||
|
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||||
|
ParentColor = False
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object ZConnection1: TZConnection
|
||||||
|
ControlsCodePage = cCP_UTF8
|
||||||
|
TransactIsolationLevel = tiReadCommitted
|
||||||
|
Connected = True
|
||||||
|
HostName = '127.0.0.1'
|
||||||
|
Port = 0
|
||||||
|
Database = 'employee'
|
||||||
|
User = 'sysdba'
|
||||||
|
Password = 'masterkey'
|
||||||
|
Protocol = 'firebirdd-2.5'
|
||||||
|
Left = 40
|
||||||
|
Top = 24
|
||||||
|
end
|
||||||
|
object ZReadOnlyQuery1: TZReadOnlyQuery
|
||||||
|
Connection = ZConnection1
|
||||||
|
OnFilterRecord = ZReadOnlyQuery1FilterRecord
|
||||||
|
SQL.Strings = (
|
||||||
|
'select'
|
||||||
|
' DEPARTMENT.DEPT_NO,'
|
||||||
|
' DEPARTMENT.DEPARTMENT,'
|
||||||
|
' DEPARTMENT.LOCATION'
|
||||||
|
'from'
|
||||||
|
' DEPARTMENT'
|
||||||
|
'order by'
|
||||||
|
' DEPARTMENT.DEPT_NO'
|
||||||
|
)
|
||||||
|
Params = <>
|
||||||
|
Left = 248
|
||||||
|
Top = 168
|
||||||
|
object ZReadOnlyQuery1DEPT_NO: TStringField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'DEPT_NO'
|
||||||
|
Index = 0
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = True
|
||||||
|
Size = 12
|
||||||
|
end
|
||||||
|
object ZReadOnlyQuery1DEPARTMENT: TStringField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'DEPARTMENT'
|
||||||
|
Index = 1
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = True
|
||||||
|
Size = 100
|
||||||
|
end
|
||||||
|
object ZReadOnlyQuery1LOCATION: TStringField
|
||||||
|
FieldKind = fkData
|
||||||
|
FieldName = 'LOCATION'
|
||||||
|
Index = 2
|
||||||
|
LookupCache = False
|
||||||
|
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||||
|
ReadOnly = False
|
||||||
|
Required = False
|
||||||
|
Size = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ZReadOnlyQuery1
|
||||||
|
Left = 216
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object RxSortZeos1: TRxSortZeos
|
||||||
|
Left = 95
|
||||||
|
Top = 24
|
||||||
|
end
|
||||||
|
end
|
55
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/unit1.pas
Normal file
55
components/rx/trunk/Demos/RxDBGrid_Filter/ZEOS/unit1.pas
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
unit Unit1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, FileUtil, rxdbgrid, RxSortZeos, ZConnection, ZDataset,
|
||||||
|
Forms, Controls, Graphics, Dialogs, db;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
RxDBGrid1: TRxDBGrid;
|
||||||
|
RxSortZeos1: TRxSortZeos;
|
||||||
|
ZConnection1: TZConnection;
|
||||||
|
ZReadOnlyQuery1: TZReadOnlyQuery;
|
||||||
|
ZReadOnlyQuery1DEPARTMENT: TStringField;
|
||||||
|
ZReadOnlyQuery1DEPT_NO: TStringField;
|
||||||
|
ZReadOnlyQuery1LOCATION: TStringField;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure ZReadOnlyQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean
|
||||||
|
);
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZConnection1.Connected:=true;
|
||||||
|
ZReadOnlyQuery1.Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.ZReadOnlyQuery1FilterRecord(DataSet: TDataSet;
|
||||||
|
var Accept: Boolean);
|
||||||
|
begin
|
||||||
|
//
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -2395,25 +2395,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TRxDBGrid }
|
{ TRxDBGrid }
|
||||||
(*
|
|
||||||
const
|
|
||||||
ALIGN_FLAGS: array[TAlignment] of integer =
|
|
||||||
(DT_LEFT or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX,
|
|
||||||
DT_RIGHT or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX,
|
|
||||||
DT_CENTER or DT_SINGLELINE {or DT_EXPANDTABS} or DT_NOPREFIX);
|
|
||||||
*)
|
|
||||||
const
|
const
|
||||||
ALIGN_FLAGS_HEADER: array[TAlignment] of integer =
|
ALIGN_FLAGS_HEADER: array[TAlignment] of integer =
|
||||||
(DT_LEFT or {DT_EXPANDTABS or} DT_NOPREFIX,
|
(DT_LEFT or {DT_EXPANDTABS or} DT_NOPREFIX,
|
||||||
DT_RIGHT or {DT_EXPANDTABS or }DT_NOPREFIX,
|
DT_RIGHT or {DT_EXPANDTABS or }DT_NOPREFIX,
|
||||||
DT_CENTER or {DT_EXPANDTABS or }DT_NOPREFIX);
|
DT_CENTER or {DT_EXPANDTABS or }DT_NOPREFIX);
|
||||||
|
|
||||||
{ TITLE_SUBHEADER = 2;
|
|
||||||
TITLE_DEFAULT = 1;
|
|
||||||
|
|
||||||
const
|
|
||||||
EdgeFlag: array[Boolean] of UINT = (BDR_RAISEDINNER, BDR_SUNKENINNER);}
|
|
||||||
|
|
||||||
procedure WriteTextHeader(ACanvas: TCanvas; ARect: TRect; const Text: string;
|
procedure WriteTextHeader(ACanvas: TCanvas; ARect: TRect; const Text: string;
|
||||||
Alignment: TAlignment);
|
Alignment: TAlignment);
|
||||||
var
|
var
|
||||||
@ -2555,8 +2542,6 @@ begin
|
|||||||
FSortEngine := RxDBGridSortEngineList.Objects[Pos] as TRxDBGridSortEngine
|
FSortEngine := RxDBGridSortEngineList.Objects[Pos] as TRxDBGridSortEngine
|
||||||
else
|
else
|
||||||
FSortEngine := nil;
|
FSortEngine := nil;
|
||||||
{ FSortField := nil;
|
|
||||||
FSortOrder := smNone;}
|
|
||||||
FSortColumns.Clear;
|
FSortColumns.Clear;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2568,7 +2553,6 @@ end;
|
|||||||
|
|
||||||
function TRxDBGrid.GetColumns: TRxDbGridColumns;
|
function TRxDBGrid.GetColumns: TRxDbGridColumns;
|
||||||
begin
|
begin
|
||||||
//Result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns);
|
|
||||||
Result := TRxDbGridColumns(inherited Columns);
|
Result := TRxDbGridColumns(inherited Columns);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2654,7 +2638,6 @@ end;
|
|||||||
|
|
||||||
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
|
procedure TRxDBGrid.SetColumns(const AValue: TRxDbGridColumns);
|
||||||
begin
|
begin
|
||||||
//TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Assign(Avalue);
|
|
||||||
inherited Columns := TDBGridColumns(AValue);
|
inherited Columns := TDBGridColumns(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3534,20 +3517,6 @@ begin
|
|||||||
FToolsList.Remove(ATools);
|
FToolsList.Remove(ATools);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{
|
|
||||||
procedure TRxDBGrid.UpdateHorzScrollBar(const aVisible: boolean; const aRange,
|
|
||||||
aPage, aPos: Integer);
|
|
||||||
begin
|
|
||||||
inherited UpdateHorzScrollBar(aVisible, aRange, aPage, aPos);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TRxDBGrid.UpdateVertScrollbar(const aVisible: boolean; const aRange,
|
|
||||||
aPage, aPos: Integer);
|
|
||||||
begin
|
|
||||||
inherited UpdateVertScrollbar(aVisible, aRange, aPage, aPos);
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
|
|
||||||
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||||
aState: TGridDrawState);
|
aState: TGridDrawState);
|
||||||
begin
|
begin
|
||||||
@ -3792,15 +3761,12 @@ begin
|
|||||||
MyCol := Columns.RealIndex(aCol - 1);
|
MyCol := Columns.RealIndex(aCol - 1);
|
||||||
with TRxColumn(Columns[MyCol]).Filter do
|
with TRxColumn(Columns[MyCol]).Filter do
|
||||||
begin
|
begin
|
||||||
// Canvas.Brush.Color := Color;
|
|
||||||
// Canvas.FillRect(aRect);
|
|
||||||
if (TitleStyle <> tsNative) then
|
if (TitleStyle <> tsNative) then
|
||||||
begin
|
begin
|
||||||
Canvas.Brush.Color := Color;
|
Canvas.Brush.Color := Color;
|
||||||
Canvas.FillRect(aRect);
|
Canvas.FillRect(aRect);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//if Value <> '' then
|
|
||||||
if CurrentValues.Count > 0 then
|
if CurrentValues.Count > 0 then
|
||||||
begin
|
begin
|
||||||
S:=CurrentValues[0];
|
S:=CurrentValues[0];
|
||||||
@ -3825,20 +3791,12 @@ begin
|
|||||||
S:='';
|
S:='';
|
||||||
|
|
||||||
Canvas.Font := TRxColumn(Columns[MyCol]).Filter.EmptyFont;
|
Canvas.Font := TRxColumn(Columns[MyCol]).Filter.EmptyFont;
|
||||||
//if (aRect.Right - aRect.Left) >= Canvas.TextWidth(Value) then
|
|
||||||
if (aRect.Right - aRect.Left) >= Canvas.TextWidth(S) then
|
if (aRect.Right - aRect.Left) >= Canvas.TextWidth(S) then
|
||||||
TxS.Alignment := Alignment
|
TxS.Alignment := Alignment
|
||||||
else
|
else
|
||||||
TxS.Alignment := taLeftJustify;
|
TxS.Alignment := taLeftJustify;
|
||||||
|
|
||||||
Canvas.TextStyle := TxS;
|
Canvas.TextStyle := TxS;
|
||||||
{
|
|
||||||
if IsNull then
|
|
||||||
DrawCellText(aCol, aRow, aRect, aState, TRxColumn(Columns[MyCol]).Filter.EmptyValue)
|
|
||||||
else
|
|
||||||
if IsAll then
|
|
||||||
DrawCellText(aCol, aRow, aRect, aState, TRxColumn(Columns[MyCol]).Filter.AllValue)
|
|
||||||
}
|
|
||||||
DrawCellText(aCol, aRow, aRect, aState, S)
|
DrawCellText(aCol, aRow, aRect, aState, S)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -5303,11 +5261,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
with TRxColumn(Columns[i]) do
|
with TRxColumn(Columns[i]) do
|
||||||
begin
|
begin
|
||||||
//if Filter.IsAll then
|
|
||||||
if Filter.State = rxfsAll then
|
if Filter.State = rxfsAll then
|
||||||
Accept:=true
|
Accept:=true
|
||||||
else
|
else
|
||||||
//if Filter.IsNull then
|
|
||||||
if Filter.State = rxfsEmpty then
|
if Filter.State = rxfsEmpty then
|
||||||
begin
|
begin
|
||||||
Accept:=Field.IsNull;
|
Accept:=Field.IsNull;
|
||||||
@ -5340,16 +5296,6 @@ begin
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
{ else
|
|
||||||
if (Filter.Value <> '') then
|
|
||||||
begin
|
|
||||||
if (Filter.Value <> Field.DisplayText) then
|
|
||||||
begin
|
|
||||||
Accept := False;
|
|
||||||
break;
|
|
||||||
end;
|
|
||||||
end;}
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if Assigned(F_EventOnFilterRec) then
|
if Assigned(F_EventOnFilterRec) then
|
||||||
|
@ -248,6 +248,8 @@ var
|
|||||||
begin
|
begin
|
||||||
if ModalResult = mrOk then
|
if ModalResult = mrOk then
|
||||||
begin
|
begin
|
||||||
|
FRxDBGrid.DataSource.DataSet.DisableControls;
|
||||||
|
FRxDBGrid.DataSource.DataSet.Filtered := false;
|
||||||
if CheckBox1.Checked then
|
if CheckBox1.Checked then
|
||||||
begin
|
begin
|
||||||
FRxColumn.Filter.State:=rxfsAll;
|
FRxColumn.Filter.State:=rxfsAll;
|
||||||
@ -274,6 +276,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
FRxDBGrid.DataSource.DataSet.Filtered := True;
|
FRxDBGrid.DataSource.DataSet.Filtered := True;
|
||||||
FRxDBGrid.DataSource.DataSet.First;
|
FRxDBGrid.DataSource.DataSet.First;
|
||||||
|
FRxDBGrid.DataSource.DataSet.EnableControls;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user