You've already forked lazarus-ccr
RxFPC:RxDBGrid - started work on grouping data in grid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5903 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
@ -0,0 +1,80 @@
|
||||
<?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>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<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>
|
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, rxnew, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
@ -0,0 +1,358 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="28">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="31"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="42"/>
|
||||
<CursorPos X="128" Y="44"/>
|
||||
<UsageCount Value="31"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="6168"/>
|
||||
<CursorPos X="57" Y="6177"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Bookmarks Count="5">
|
||||
<Item0 X="3" Y="4356" ID="5"/>
|
||||
<Item1 X="3" Y="5572" ID="3"/>
|
||||
<Item2 X="5" Y="6159" ID="4"/>
|
||||
<Item3 X="63" Y="4523" ID="1"/>
|
||||
<Item4 X="3" Y="6172" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="70"/>
|
||||
<CursorPos X="30" Y="91"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/classes/lists.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="316"/>
|
||||
<CursorPos X="13" Y="328"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../../../install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1669"/>
|
||||
<CursorPos X="14" Y="1687"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../../../install/source/fpcsrc/packages/fcl-db/src/base/datasource.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="212"/>
|
||||
<CursorPos Y="218"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../../../install/source/fpcsrc/packages/fcl-db/src/base/dataset.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1825"/>
|
||||
<CursorPos X="3" Y="1829"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxmemds.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1108"/>
|
||||
<CursorPos Y="1127"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="4845"/>
|
||||
<CursorPos X="24" Y="4847"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="965"/>
|
||||
<CursorPos Y="978"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/control.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1009"/>
|
||||
<CursorPos Y="1029"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/wincontrol.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="8038"/>
|
||||
<CursorPos Y="8066"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/scrollingwincontrol.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="76"/>
|
||||
<CursorPos Y="95"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/inc/systemh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="338"/>
|
||||
<CursorPos X="9" Y="357"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/classes/stringl.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1571"/>
|
||||
<CursorPos X="3" Y="1573"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/sysutils/sysstrh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="73"/>
|
||||
<CursorPos X="10" Y="92"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/objpas/sysutils/sysstr.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="551"/>
|
||||
<CursorPos X="5" Y="553"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/inc/ustringh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="87"/>
|
||||
<CursorPos X="5" Y="106"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/canvas.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1579"/>
|
||||
<CursorPos Y="1600"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/winapi.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="597"/>
|
||||
<CursorPos Y="617"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/widgetset/wsgrids.pp"/>
|
||||
<UnitName Value="WSGrids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="35"/>
|
||||
<CursorPos X="20" Y="53"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/interfaces/gtk2/gtk2wsgrids.pp"/>
|
||||
<UnitName Value="Gtk2WSGrids"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="31"/>
|
||||
<CursorPos Y="66"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2277"/>
|
||||
<CursorPos X="3" Y="2298"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/inc/typshrdh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="127"/>
|
||||
<CursorPos X="17" Y="153"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../../../../install/source/fpcsrc/rtl/inc/typshrd.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="300"/>
|
||||
<CursorPos X="3" Y="302"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/include/customcheckbox.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="114"/>
|
||||
<CursorPos Y="134"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/interfaces/gtk2/gtk2widgetset.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="16"/>
|
||||
<CursorPos Y="44"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit27>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3466" TopLine="3443"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3473" TopLine="3443"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3474" TopLine="3443"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3475" TopLine="3444"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3476" TopLine="3445"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3475" TopLine="3445"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3478" TopLine="3450"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3399" TopLine="3380"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="3400" TopLine="3380"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5921" TopLine="5911"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5922" TopLine="5911"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5923" TopLine="5911"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5929" TopLine="5911"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5931" TopLine="5911"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5932" TopLine="5911"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2094" TopLine="2075"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2095" TopLine="2075"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2098" TopLine="2075"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2099" TopLine="2075"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="5934" TopLine="5915"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="678" Column="18" TopLine="659"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2482" Column="61" TopLine="2451"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2483" Column="52" TopLine="2452"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2874" Column="28" TopLine="2843"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="2887" Column="24" TopLine="2857"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="4846" Column="24" TopLine="4813"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||
<Caret Line="4847" Column="24" TopLine="4813"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5166" Column="10" TopLine="5141"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="912" Column="15" TopLine="884"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="6177" Column="57" TopLine="6168"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
<Debugging>
|
||||
<Watches Count="1">
|
||||
<Item1>
|
||||
<Expression Value="RNew"/>
|
||||
</Item1>
|
||||
</Watches>
|
||||
</Debugging>
|
||||
</CONFIG>
|
Binary file not shown.
297
components/rx/trunk/demos/rxdbgrid/RxDBGridGroupData/unit1.lfm
Normal file
297
components/rx/trunk/demos/rxdbgrid/RxDBGridGroupData/unit1.lfm
Normal file
@ -0,0 +1,297 @@
|
||||
object Form1: TForm1
|
||||
Left = 570
|
||||
Height = 556
|
||||
Top = 275
|
||||
Width = 796
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 556
|
||||
ClientWidth = 796
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 493
|
||||
Top = 63
|
||||
Width = 796
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = False
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'ID'
|
||||
Width = 50
|
||||
FieldName = 'ID'
|
||||
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 = 'GROUP'
|
||||
Width = 60
|
||||
FieldName = 'GROUP_ID'
|
||||
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 = 'SUM'
|
||||
Width = 90
|
||||
FieldName = 'SUM'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footer.Alignment = taRightJustify
|
||||
Footer.FieldName = 'SUM'
|
||||
Footer.ValueType = fvtSum
|
||||
Footers = <>
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'TEXT'
|
||||
Width = 264
|
||||
FieldName = 'TEXT'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Footers = <>
|
||||
WordWrap = True
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
Title.Caption = 'AAA'
|
||||
Width = 250
|
||||
FieldName = 'AAA'
|
||||
EditButtons = <>
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Пусто)'
|
||||
Filter.AllValue = '(Все значения)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
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.Active = True
|
||||
FooterOptions.Color = clYellow
|
||||
FooterOptions.RowCount = 1
|
||||
FooterOptions.DrawFullLine = True
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter]
|
||||
FooterColor = clYellow
|
||||
FooterRowCount = 1
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Color = clWindow
|
||||
DrawFullLine = True
|
||||
FocusColor = clRed
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = dsData
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
|
||||
TabOrder = 0
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 113
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Groups active'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
AnchorSideLeft.Control = CheckBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 125
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 96
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Footer row'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckBox3: TCheckBox
|
||||
AnchorSideLeft.Control = CheckBox2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 227
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 88
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'ReadOnly'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
end
|
||||
object rxData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
item
|
||||
Name = 'ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'GROUP_ID'
|
||||
DataType = ftInteger
|
||||
end
|
||||
item
|
||||
Name = 'SUM'
|
||||
DataType = ftCurrency
|
||||
end
|
||||
item
|
||||
Name = 'TEXT'
|
||||
DataType = ftString
|
||||
Size = 500
|
||||
end
|
||||
item
|
||||
Name = 'AAA'
|
||||
DataType = ftString
|
||||
Size = 50
|
||||
end>
|
||||
PacketRecords = 0
|
||||
Left = 432
|
||||
Top = 16
|
||||
object rxDataID: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'ID'
|
||||
Index = 0
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataGROUP_ID: TLongintField
|
||||
FieldKind = fkData
|
||||
FieldName = 'GROUP_ID'
|
||||
Index = 1
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
end
|
||||
object rxDataSUM: TCurrencyField
|
||||
FieldKind = fkData
|
||||
FieldName = 'SUM'
|
||||
Index = 2
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
Precision = 2
|
||||
end
|
||||
object rxDataTEXT: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'TEXT'
|
||||
Index = 3
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 500
|
||||
end
|
||||
object rxDataAAA: TStringField
|
||||
FieldKind = fkData
|
||||
FieldName = 'AAA'
|
||||
Index = 4
|
||||
LookupCache = False
|
||||
ProviderFlags = [pfInUpdate, pfInWhere]
|
||||
ReadOnly = False
|
||||
Required = False
|
||||
Size = 50
|
||||
end
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
Left = 392
|
||||
Top = 16
|
||||
end
|
||||
end
|
@ -0,0 +1,79 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
CheckBox3: TCheckBox;
|
||||
dsData: TDataSource;
|
||||
rxDataAAA: TStringField;
|
||||
rxDataGROUP_ID: TLongintField;
|
||||
rxDataID: TLongintField;
|
||||
rxDataSUM: TCurrencyField;
|
||||
rxDataTEXT: TStringField;
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
rxData: TRxMemoryData;
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
rxData.Open;
|
||||
for i:=1 to 200 do
|
||||
rxData.AppendRecord([i, ((i-1) div 4) + 1, Random * 1000, Format('Test string %d', [i])]);
|
||||
|
||||
RxDBGrid1.GroupItems.GroupFieldName:='GROUP_ID';
|
||||
RxDBGrid1.ColumnByFieldName('SUM').GroupParam.ValueType:=fvtSum;
|
||||
RxDBGrid1.ColumnByFieldName('SUM').GroupParam.Alignment:=taRightJustify;
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('GROUP_ID').GroupParam.ValueType:=fvtCount;
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('ID').GroupParam.ValueType:=fvtStaticText;
|
||||
RxDBGrid1.ColumnByFieldName('ID').GroupParam.StaticText:='Группа:';
|
||||
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.ValueType:=fvtFieldValue;
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.Alignment:=taCenter;
|
||||
RxDBGrid1.ColumnByFieldName('AAA').GroupParam.Color:=clRed;
|
||||
RxDBGrid1.GroupItems.Color:=clSkyBlue;
|
||||
|
||||
rxData.First;
|
||||
|
||||
CheckBox1Change(nil);
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
RxDBGrid1.GroupItems.Active:=CheckBox1.Checked;
|
||||
RxDBGrid1.FooterOptions.Active:=CheckBox2.Checked;
|
||||
RxDBGrid1.ReadOnly:=CheckBox3.Checked;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user