You've already forked lazarus-ccr
RxFPC:RxDBGrid - add new filter style rxfstManualEdit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6086 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -55,13 +55,13 @@
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="57">
|
||||
<Units Count="61">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos Y="17"/>
|
||||
<UsageCount Value="125"/>
|
||||
<UsageCount Value="127"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
@ -70,9 +70,9 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<TopLine Value="78"/>
|
||||
<CursorPos X="141" Y="84"/>
|
||||
<UsageCount Value="125"/>
|
||||
<TopLine Value="138"/>
|
||||
<CursorPos X="43" Y="138"/>
|
||||
<UsageCount Value="127"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -407,12 +407,10 @@
|
||||
</Unit47>
|
||||
<Unit48>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="6230"/>
|
||||
<CursorPos X="8" Y="6265"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit48>
|
||||
<Unit49>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
@ -447,10 +445,11 @@
|
||||
</Unit52>
|
||||
<Unit53>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1805"/>
|
||||
<CursorPos X="14" Y="1822"/>
|
||||
<UsageCount Value="9"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="1652"/>
|
||||
<CursorPos X="14" Y="1665"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit53>
|
||||
<Unit54>
|
||||
<Filename Value="../../rxdb/rxdbgrid_findunit.pas"/>
|
||||
@ -468,129 +467,163 @@
|
||||
</Unit55>
|
||||
<Unit56>
|
||||
<Filename Value="../../rx.inc"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="23"/>
|
||||
<CursorPos Y="60"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit56>
|
||||
<Unit57>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="5938"/>
|
||||
<CursorPos X="94" Y="5955"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit57>
|
||||
<Unit58>
|
||||
<Filename Value="../../../rxdb/rxmemds.pas"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="1077"/>
|
||||
<CursorPos X="51" Y="1090"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit58>
|
||||
<Unit59>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/bufdataset_parser.pp"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="38"/>
|
||||
<CursorPos Y="39"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/dataset.inc"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="1452"/>
|
||||
<CursorPos X="3" Y="1457"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit60>
|
||||
</Units>
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<JumpHistory Count="30" HistoryIndex="27">
|
||||
<Position1>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4693" Column="49" TopLine="4665"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="925" Column="15" TopLine="909"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4717" Column="58" TopLine="4689"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="6123" Column="22" TopLine="6103"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4747" Column="25" TopLine="4719"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="961" Column="15" TopLine="957"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4751" Column="33" TopLine="4723"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="6888" Column="3" TopLine="6884"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4752" Column="40" TopLine="4724"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="913" Column="15" TopLine="908"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4936" Column="38" TopLine="4908"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5487" Column="3" TopLine="5483"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4938" Column="32" TopLine="4910"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5490" Column="12" TopLine="5482"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="780" Column="38" TopLine="765"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="896" Column="66" TopLine="869"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="387" Column="65" TopLine="355"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4936" Column="44" TopLine="4908"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5435" Column="24" TopLine="5403"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5498" Column="22" TopLine="5461"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="780" Column="40" TopLine="753"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="896" Column="66" TopLine="869"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="386" Column="65" TopLine="355"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4940" Column="3" TopLine="4908"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5434" Column="24" TopLine="5403"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="32" Column="9" TopLine="22"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5489" Column="5" TopLine="5459"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="108" Column="9" TopLine="98"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2526" Column="10" TopLine="2492"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4336" Column="24" TopLine="4305"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5005" Column="10" TopLine="4972"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4338" Column="26" TopLine="4320"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5091" Column="10" TopLine="5056"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4941" Column="39" TopLine="4917"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5192" Column="10" TopLine="5160"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4960" Column="39" TopLine="4936"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5551" Column="14" TopLine="5515"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5421" Column="21" TopLine="5399"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5573" Column="14" TopLine="5540"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5427" Column="21" TopLine="5399"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5599" Column="14" TopLine="5564"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5432" Column="21" TopLine="5401"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5640" Column="14" TopLine="5607"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5433" Column="21" TopLine="5402"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5725" Column="8" TopLine="5688"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5489" Column="19" TopLine="5470"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5738" Column="8" TopLine="5701"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5953" Column="27" TopLine="5924"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5756" Column="8" TopLine="5720"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5954" Column="66" TopLine="5924"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5804" Column="8" TopLine="5771"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5953" Column="28" TopLine="5937"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5855" Column="8" TopLine="5820"/>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="387" Column="62" TopLine="368"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4961" Column="46" TopLine="4931"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -615,4 +648,20 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="1">
|
||||
<Item1>
|
||||
<Kind Value="bpkSource"/>
|
||||
<WatchScope Value="wpsLocal"/>
|
||||
<WatchKind Value="wpkWrite"/>
|
||||
<Source Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Line Value="6063"/>
|
||||
</Item1>
|
||||
</BreakPoints>
|
||||
<Exceptions Count="1">
|
||||
<Item1>
|
||||
<Name Value="RunError(216)"/>
|
||||
</Item1>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
Binary file not shown.
@ -11,7 +11,7 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
OnCreate = FormCreate
|
||||
SessionProperties = 'RxDBGridExportSpreadSheet1.FileName;RxDBGridExportSpreadSheet1.OpenAfterExport;RxDBGridExportSpreadSheet1.Options;RxDBGridExportSpreadSheet1.PageName;RxDBGridPrint1.Options;RxDBGridPrint1.Orientation;RxDBGridPrint1.PageMargin;RxDBGridPrint1.ReportTitle;RxDBGridPrint1.ShowColumnHeaderOnAllPage'
|
||||
ShowHint = True
|
||||
LCLVersion = '1.7'
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 627
|
||||
@ -33,8 +33,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Constraints.MinWidth = 50
|
||||
Constraints.MaxWidth = 150
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
@ -59,8 +57,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Width = 100
|
||||
FieldName = 'ID'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
@ -83,8 +79,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
FieldName = 'Developer'
|
||||
Constraints.MinWidth = 10
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
@ -92,6 +86,7 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstDialog
|
||||
Footer.Value = 'This is test'
|
||||
Footer.ValueType = fvtStaticText
|
||||
Footer.Font.Color = clRed
|
||||
@ -111,8 +106,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Width = 110
|
||||
FieldName = 'NAME'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
@ -120,6 +113,7 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Filter.AllValue = '(All values)'
|
||||
Filter.EmptyFont.Style = [fsItalic]
|
||||
Filter.ItemIndex = -1
|
||||
Filter.Style = rxfstManualEdit
|
||||
Footers = <>
|
||||
WordWrap = True
|
||||
end
|
||||
@ -146,8 +140,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Hint = 'Clear value'
|
||||
OnClick = TRxColumnEditButtons2Click
|
||||
end>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
@ -182,8 +174,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Width = 136
|
||||
FieldName = 'Date_Present'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
@ -201,8 +191,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Width = 141
|
||||
FieldName = 'DEVELOPER_ID'
|
||||
EditButtons = <>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
@ -364,8 +352,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Hint = 'Style "UpDownRx"'
|
||||
Style = ebsUpDownRx
|
||||
end>
|
||||
Filter.IsNull = False
|
||||
Filter.IsAll = True
|
||||
Filter.Font.Style = [fsItalic]
|
||||
Filter.DropDownRows = 0
|
||||
Filter.EmptyValue = '(Нет)'
|
||||
@ -450,7 +436,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
GridLineStyle = psSolid
|
||||
DataSource = Datasource1
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgMultiselect, dgHeaderPushedLook]
|
||||
ParentColor = False
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
|
@ -131,7 +131,7 @@ begin
|
||||
RxMemoryData2.AppendRecord([3, 'Microsoft']);
|
||||
|
||||
RxMemoryData1.Open;
|
||||
RxMemoryData1.AppendRecord([1, 'Lazarus 0.9.23', 0, 'Open source', EncodeDate(2006, 1, 1), 1]);
|
||||
RxMemoryData1.AppendRecord([1, 'Lazarus', 0, 'Open source', EncodeDate(2006, 1, 1), 1]);
|
||||
RxMemoryData1.AppendRecord([2, 'Delphi 7.0 Prof', 990, 'Borland', EncodeDate(2002, 1, 1), 2]);
|
||||
RxMemoryData1.AppendRecord([3, 'Open Office 2.2.0', 0, 'Open source', EncodeDate(2006, 10, 1), 1]);
|
||||
RxMemoryData1.AppendRecord([4, 'Microsoft Office', 150, 'Microsoft', EncodeDate(1997, 8, 12), 3]);
|
||||
@ -147,6 +147,8 @@ begin
|
||||
RxMemoryData1.AppendRecord([14, 'Бух. комплекс "45-я Параллель"', 180, 'ООО "Boot"', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([15, 'Консультант+', 380, 'Консультант+', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([16, 'Гарант', 480, 'Гарант', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([17, 'Fedora Linux', 0, 'Open source', EncodeDate(2007, 2, 1), 3]);
|
||||
RxMemoryData1.AppendRecord([17, 'Ubuntu Linux', 0, 'Open source', EncodeDate(2007, 2, 1), 3]);
|
||||
|
||||
RxMemoryData1.First;
|
||||
|
||||
@ -234,22 +236,20 @@ end;
|
||||
|
||||
procedure TRxDBGridMainForm.DoFillFilters;
|
||||
var
|
||||
C:TRxColumn;
|
||||
i:integer;
|
||||
C: TRxColumn;
|
||||
begin
|
||||
for i:=0 to RxDBGrid1.Columns.Count-1 do
|
||||
for C in RxDBGrid1.Columns do
|
||||
begin
|
||||
C:=TRxColumn(RxDBGrid1.Columns[i]);
|
||||
C.Filter.EmptyValue:='None...';
|
||||
C.Filter.ValueList.Add(C.Filter.EmptyValue);
|
||||
// C.Filter.Style:=;
|
||||
end;
|
||||
|
||||
RxMemoryData1.First;
|
||||
while not RxMemoryData1.EOF do
|
||||
begin
|
||||
for i:=0 to RxDBGrid1.Columns.Count-1 do
|
||||
for C in RxDBGrid1.Columns do
|
||||
begin
|
||||
C:=TRxColumn(RxDBGrid1.Columns[i]);
|
||||
if C.Filter.ValueList.IndexOf(C.Field.AsString)<0 then
|
||||
C.Filter.ValueList.Add(C.Field.AsString);
|
||||
end;
|
||||
|
@ -384,7 +384,7 @@ type
|
||||
{ TRxColumnFilter }
|
||||
|
||||
TRxFilterState = (rxfsAll, rxfsEmpty, rxfsNonEmpty, rxfsFilter{, rxfsTopXXXX});
|
||||
TRxFilterStyle = (rxfstSimple, rxfstDialog);
|
||||
TRxFilterStyle = (rxfstSimple, rxfstDialog, rxfstManualEdit);
|
||||
|
||||
TRxColumnFilter = class(TPersistent)
|
||||
private
|
||||
@ -710,6 +710,23 @@ type
|
||||
property Col: integer read FCol;
|
||||
end;
|
||||
|
||||
{ TFilterSimpleEdit }
|
||||
|
||||
TFilterSimpleEdit = class(TEdit)
|
||||
private
|
||||
FGrid: TCustomGrid;
|
||||
FCol: integer;
|
||||
FMouseFlag: boolean;
|
||||
protected
|
||||
procedure WndProc(var TheMessage: TLMessage); override;
|
||||
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
||||
public
|
||||
procedure Show(Grid: TCustomGrid; Col: integer);
|
||||
property Grid: TCustomGrid read FGrid;
|
||||
property Col: integer read FCol;
|
||||
property MouseFlag: boolean read FMouseFlag write FMouseFlag;
|
||||
end;
|
||||
|
||||
|
||||
{ TRxDBGrid }
|
||||
TRxDBGrid = class(TCustomDBGrid)
|
||||
@ -763,6 +780,7 @@ type
|
||||
|
||||
FFilterListEditor: TFilterListCellEditor;
|
||||
FFilterColDlgButton: TFilterColDlgButton;
|
||||
FFilterSimpleEdit:TFilterSimpleEdit;
|
||||
|
||||
// FOldPosition: Integer;
|
||||
FVersion: integer;
|
||||
@ -892,6 +910,7 @@ type
|
||||
procedure FFilterListEditorOnChange(Sender: TObject);
|
||||
procedure FFilterListEditorOnCloseUp(Sender: TObject);
|
||||
procedure FFilterColDlgButtonOnClick(Sender: TObject);
|
||||
procedure FFilterSimpleEditOnChange(Sender: TObject);
|
||||
|
||||
procedure InternalOptimizeColumnsWidth(AColList: TList);
|
||||
procedure VisualChange; override;
|
||||
@ -1245,6 +1264,45 @@ type
|
||||
procedure EditingDone; override;
|
||||
end;
|
||||
|
||||
{ TFilterSimpleEdit }
|
||||
|
||||
procedure TFilterSimpleEdit.WndProc(var TheMessage: TLMessage);
|
||||
begin
|
||||
if TheMessage.msg = LM_KILLFOCUS then
|
||||
begin
|
||||
Change;
|
||||
Hide;
|
||||
if HWND(TheMessage.WParam) = HWND(Handle) then
|
||||
begin
|
||||
// lost the focus but it returns to ourselves
|
||||
// eat the message.
|
||||
TheMessage.Result := 0;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
inherited WndProc(TheMessage);
|
||||
end;
|
||||
|
||||
procedure TFilterSimpleEdit.KeyDown(var Key: word; Shift: TShiftState);
|
||||
begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
case Key of
|
||||
VK_RETURN:
|
||||
begin
|
||||
Change;
|
||||
Hide;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFilterSimpleEdit.Show(Grid: TCustomGrid; Col: integer);
|
||||
begin
|
||||
FGrid := Grid;
|
||||
FCol := Col;
|
||||
Visible := True;
|
||||
SetFocus;
|
||||
end;
|
||||
|
||||
{ TRxColumnGroupParam }
|
||||
|
||||
procedure TRxColumnGroupParam.FontChanged(Sender: TObject);
|
||||
@ -3155,6 +3213,7 @@ begin
|
||||
begin
|
||||
FFilterListEditor.Hide;
|
||||
FFilterColDlgButton.Hide;
|
||||
FFilterSimpleEdit.Hide;
|
||||
LayoutChanged;
|
||||
end;
|
||||
|
||||
@ -3390,6 +3449,11 @@ begin
|
||||
RowHeights[0] := RowHeights[0] + FFilterListEditor.Height
|
||||
end
|
||||
else
|
||||
if Assigned(FFilterSimpleEdit) then
|
||||
begin
|
||||
RowHeights[0] := RowHeights[0] + FFilterSimpleEdit.Height
|
||||
end
|
||||
else
|
||||
begin
|
||||
RowHeights[0] := RowHeights[0] + FDefRowH;
|
||||
end;
|
||||
@ -4858,6 +4922,11 @@ begin
|
||||
begin
|
||||
if C.Filter.Style = rxfstSimple then
|
||||
begin
|
||||
if FFilterSimpleEdit.Visible then
|
||||
FFilterSimpleEdit.Hide;
|
||||
if FFilterColDlgButton.Visible then
|
||||
FFilterColDlgButton.Hide;
|
||||
|
||||
FFilterListEditor.Style := csDropDownList;
|
||||
if C.Filter.DropDownRows>0 then
|
||||
FFilterListEditor.DropDownCount := C.Filter.DropDownRows;
|
||||
@ -4876,10 +4945,32 @@ begin
|
||||
FFilterListEditor.Show(Self, Cell.x - 1);
|
||||
end
|
||||
else
|
||||
if C.Filter.Style = rxfstManualEdit then
|
||||
begin
|
||||
if FFilterListEditor.Visible then
|
||||
FFilterListEditor.Hide;
|
||||
|
||||
if FFilterColDlgButton.Visible then
|
||||
FFilterColDlgButton.Hide;
|
||||
|
||||
FFilterSimpleEdit.Parent := Self;
|
||||
FFilterSimpleEdit.Width := Rect.Right - Rect.Left;
|
||||
FFilterSimpleEdit.Height := Rect.Bottom - Rect.Top;
|
||||
FFilterSimpleEdit.BoundsRect := Rect;
|
||||
if C.Filter.CurrentValues.Count>0 then
|
||||
FFilterSimpleEdit.Text := C.Filter.CurrentValues[0]
|
||||
else
|
||||
FFilterSimpleEdit.Text := '';
|
||||
FFilterSimpleEdit.Show(Self, Cell.x - 1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if FFilterListEditor.Visible then
|
||||
FFilterListEditor.Hide;
|
||||
|
||||
if FFilterSimpleEdit.Visible then
|
||||
FFilterSimpleEdit.Hide;
|
||||
|
||||
FFilterColDlgButton.Parent:=Self;
|
||||
FFilterColDlgButton.Width := 32;
|
||||
FFilterColDlgButton.Height := Rect.Bottom - Rect.Top;
|
||||
@ -5391,6 +5482,24 @@ begin
|
||||
RxDBGrid_PopUpFilterForm.Free;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.FFilterSimpleEditOnChange(Sender: TObject);
|
||||
begin
|
||||
with TRxColumn(Columns[Columns.RealIndex(FFilterSimpleEdit.Col)]).Filter do
|
||||
begin
|
||||
CurrentValues.Text:=FFilterSimpleEdit.Text;
|
||||
State:=rxfsFilter;
|
||||
end;
|
||||
|
||||
DataSource.DataSet.DisableControls;
|
||||
DataSource.DataSet.Filtered:=false;
|
||||
DataSource.DataSet.Filtered:=true;
|
||||
CalcStatTotals;
|
||||
DataSource.DataSet.EnableControls;
|
||||
|
||||
if Assigned(FOnFiltred) then
|
||||
FOnFiltred(Self);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.InternalOptimizeColumnsWidth(AColList: TList);
|
||||
var
|
||||
P: TBookmark;
|
||||
@ -5485,9 +5594,16 @@ begin
|
||||
FFilterListEditor.Left:=R.Left;
|
||||
end
|
||||
else
|
||||
if FFilterSimpleEdit.Visible then
|
||||
begin
|
||||
R:=CellRect(FFilterSimpleEdit.Col+1,0);
|
||||
FFilterSimpleEdit.Width:=Columns[FFilterSimpleEdit.Col].Width;
|
||||
FFilterSimpleEdit.Left:=R.Left;
|
||||
end
|
||||
else
|
||||
if FFilterColDlgButton.Visible then
|
||||
begin
|
||||
R:=CellRect(FFilterListEditor.Col+1,0);
|
||||
R:=CellRect(FFilterColDlgButton.Col+1,0);
|
||||
FFilterColDlgButton.Left := R.Right - FFilterColDlgButton.Width;
|
||||
end;
|
||||
end;
|
||||
@ -5834,6 +5950,15 @@ begin
|
||||
else}
|
||||
if Filter.CurrentValues.Count > 0 then
|
||||
begin
|
||||
if Filter.Style = rxfstManualEdit then
|
||||
begin
|
||||
if UTF8Pos(UTF8UpperCase(Filter.CurrentValues[0]), UTF8UpperCase(Field.DisplayText)) < 1 then
|
||||
begin
|
||||
Accept := False;
|
||||
break;
|
||||
end;
|
||||
end
|
||||
else
|
||||
if Filter.CurrentValues.IndexOf(Field.DisplayText) < 0 then
|
||||
begin
|
||||
Accept := False;
|
||||
@ -6690,6 +6815,12 @@ begin
|
||||
FFilterColDlgButton.OnClick := @FFilterColDlgButtonOnClick;
|
||||
FFilterColDlgButton.Glyph.Assign(FEllipsisRxBMP);
|
||||
|
||||
|
||||
FFilterSimpleEdit:=TFilterSimpleEdit.Create(nil);
|
||||
FFilterSimpleEdit.Name := 'FFilterSimpleEdit';
|
||||
FFilterSimpleEdit.Visible := False;
|
||||
FFilterSimpleEdit.OnChange := @FFilterSimpleEditOnChange;
|
||||
|
||||
FColumnResizing := False;
|
||||
|
||||
FRxDbGridLookupComboEditor := TRxDBGridLookupComboEditor.Create(nil);
|
||||
@ -7070,7 +7201,6 @@ end;
|
||||
|
||||
procedure TFilterListCellEditor.WndProc(var TheMessage: TLMessage);
|
||||
begin
|
||||
|
||||
if TheMessage.msg = LM_KILLFOCUS then
|
||||
begin
|
||||
Change;
|
||||
|
@ -1082,7 +1082,7 @@ begin
|
||||
Result := FActive and (TBookmarkData(ABookmark^) > Low(Integer)) and
|
||||
(TBookmarkData(ABookmark^) <= FLastID);
|
||||
{$ELSE}
|
||||
Result := FActive and (TBookmarkData(pointer(ABookmark)^) > Low(Integer)) and
|
||||
Result := FActive and Assigned(ABookmark) and (TBookmarkData(pointer(ABookmark)^) > Low(Integer)) and
|
||||
(TBookmarkData(pointer(ABookmark)^) <= FLastID);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
Reference in New Issue
Block a user