diff --git a/components/rx/trunk/Demos/RxMemDSFilter/project1.ico b/components/rx/trunk/Demos/RxMemDSFilter/project1.ico
new file mode 100644
index 000000000..0341321b5
Binary files /dev/null and b/components/rx/trunk/Demos/RxMemDSFilter/project1.ico differ
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/project1.lpi b/components/rx/trunk/Demos/RxMemDSFilter/project1.lpi
new file mode 100644
index 000000000..d1502bff4
--- /dev/null
+++ b/components/rx/trunk/Demos/RxMemDSFilter/project1.lpi
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/project1.lpr b/components/rx/trunk/Demos/RxMemDSFilter/project1.lpr
new file mode 100644
index 000000000..9ab48920c
--- /dev/null
+++ b/components/rx/trunk/Demos/RxMemDSFilter/project1.lpr
@@ -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.
+
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/project1.lps b/components/rx/trunk/Demos/RxMemDSFilter/project1.lps
new file mode 100644
index 000000000..085df31ee
--- /dev/null
+++ b/components/rx/trunk/Demos/RxMemDSFilter/project1.lps
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/project1.res b/components/rx/trunk/Demos/RxMemDSFilter/project1.res
new file mode 100644
index 000000000..e994dfa65
Binary files /dev/null and b/components/rx/trunk/Demos/RxMemDSFilter/project1.res differ
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/unit1.lfm b/components/rx/trunk/Demos/RxMemDSFilter/unit1.lfm
new file mode 100644
index 000000000..561886330
--- /dev/null
+++ b/components/rx/trunk/Demos/RxMemDSFilter/unit1.lfm
@@ -0,0 +1,246 @@
+object Form1: TForm1
+ Left = 455
+ Height = 746
+ Top = 191
+ Width = 1039
+ Caption = 'Form1'
+ ClientHeight = 746
+ ClientWidth = 1039
+ OnCreate = FormCreate
+ Position = poScreenCenter
+ SessionProperties = 'Edit1.Text'
+ LCLVersion = '1.7'
+ object CheckBox1: TCheckBox
+ AnchorSideLeft.Control = Owner
+ AnchorSideTop.Control = Owner
+ Left = 6
+ Height = 24
+ Top = 6
+ Width = 99
+ BorderSpacing.Around = 6
+ Caption = 'CheckBox1'
+ OnChange = CheckBox1Change
+ TabOrder = 0
+ end
+ object Edit1: TEdit
+ AnchorSideLeft.Control = Label1
+ AnchorSideLeft.Side = asrBottom
+ AnchorSideTop.Control = CheckBox1
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Owner
+ AnchorSideRight.Side = asrBottom
+ Left = 119
+ Height = 37
+ Top = 36
+ Width = 914
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Around = 6
+ TabOrder = 1
+ Text = 'Edit1'
+ end
+ object Label1: TLabel
+ AnchorSideLeft.Control = CheckBox1
+ AnchorSideBottom.Control = Edit1
+ AnchorSideBottom.Side = asrBottom
+ Left = 6
+ Height = 20
+ Top = 53
+ Width = 107
+ Anchors = [akLeft, akBottom]
+ Caption = 'Filter expression'
+ ParentColor = False
+ end
+ object RxDBGrid1: TRxDBGrid
+ AnchorSideLeft.Control = Owner
+ AnchorSideTop.Control = Edit1
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Owner
+ AnchorSideRight.Side = asrBottom
+ AnchorSideBottom.Control = Memo1
+ Left = 0
+ Height = 521
+ Top = 79
+ Width = 1039
+ ColumnDefValues.BlobText = '(данные)'
+ TitleButtons = False
+ AutoSort = True
+ Columns = <
+ item
+ Title.Alignment = taCenter
+ Title.Orientation = toHorizontal
+ Title.Caption = 'ID'
+ Width = 90
+ FieldName = 'ID'
+ EditButtons = <>
+ Filter.DropDownRows = 0
+ Filter.EmptyValue = '(Нет)'
+ Filter.EmptyFont.Style = [fsItalic]
+ Filter.ItemIndex = -1
+ Footers = <>
+ end
+ item
+ Title.Alignment = taCenter
+ Title.Orientation = toHorizontal
+ Title.Caption = 'NAME'
+ Width = 500
+ FieldName = 'NAME'
+ EditButtons = <>
+ Filter.DropDownRows = 0
+ Filter.EmptyValue = '(Нет)'
+ Filter.EmptyFont.Style = [fsItalic]
+ Filter.ItemIndex = -1
+ Footers = <>
+ end
+ item
+ Title.Alignment = taCenter
+ Title.Orientation = toHorizontal
+ Title.Caption = 'CODE'
+ Width = 100
+ FieldName = 'CODE'
+ EditButtons = <>
+ Filter.DropDownRows = 0
+ Filter.EmptyValue = '(Нет)'
+ 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.DrawFullLine = False
+ OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter]
+ Anchors = [akTop, akLeft, akRight, akBottom]
+ 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
+ TabOrder = 2
+ end
+ object Memo1: TMemo
+ Left = 0
+ Height = 146
+ Top = 600
+ Width = 1039
+ Align = alBottom
+ Lines.Strings = (
+ 'Memo1'
+ )
+ ReadOnly = True
+ TabOrder = 3
+ end
+ object RxMemoryData1: TRxMemoryData
+ FieldDefs = <
+ item
+ Name = 'ID'
+ DataType = ftInteger
+ end
+ item
+ Name = 'NAME'
+ DataType = ftString
+ Size = 100
+ end
+ item
+ Name = 'CODE'
+ DataType = ftInteger
+ end>
+ PacketRecords = 0
+ left = 328
+ top = 270
+ object RxMemoryData1ID: TLongintField
+ FieldKind = fkData
+ FieldName = 'ID'
+ Index = 0
+ LookupCache = False
+ ProviderFlags = [pfInUpdate, pfInWhere]
+ ReadOnly = False
+ Required = False
+ end
+ object RxMemoryData1NAME: TStringField
+ FieldKind = fkData
+ FieldName = 'NAME'
+ Index = 1
+ LookupCache = False
+ ProviderFlags = [pfInUpdate, pfInWhere]
+ ReadOnly = False
+ Required = False
+ Size = 100
+ end
+ object RxMemoryData1CODE: TLongintField
+ FieldKind = fkData
+ FieldName = 'CODE'
+ Index = 2
+ LookupCache = False
+ ProviderFlags = [pfInUpdate, pfInWhere]
+ ReadOnly = False
+ Required = False
+ end
+ end
+ object DataSource1: TDataSource
+ DataSet = RxMemoryData1
+ left = 288
+ top = 272
+ end
+ object RxIniPropStorage1: TRxIniPropStorage
+ StoredValues = <>
+ SeparateFiles = True
+ left = 471
+ top = 27
+ end
+end
diff --git a/components/rx/trunk/Demos/RxMemDSFilter/unit1.pas b/components/rx/trunk/Demos/RxMemDSFilter/unit1.pas
new file mode 100644
index 000000000..1fcac7dc9
--- /dev/null
+++ b/components/rx/trunk/Demos/RxMemDSFilter/unit1.pas
@@ -0,0 +1,78 @@
+unit Unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, rxdbgrid, rxmemds, RxIniPropStorage, Forms,
+ Controls, Graphics, Dialogs, StdCtrls, db;
+
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ CheckBox1: TCheckBox;
+ DataSource1: TDataSource;
+ Edit1: TEdit;
+ Label1: TLabel;
+ Memo1: TMemo;
+ RxDBGrid1: TRxDBGrid;
+ RxIniPropStorage1: TRxIniPropStorage;
+ RxMemoryData1: TRxMemoryData;
+ RxMemoryData1CODE: TLongintField;
+ RxMemoryData1ID: TLongintField;
+ RxMemoryData1NAME: TStringField;
+ 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
+ RxMemoryData1.Open;
+ for i:=1 to 20 do
+ begin
+ RxMemoryData1.Append;
+ RxMemoryData1ID.AsInteger:=i;
+ RxMemoryData1NAME.AsString:='Line '+IntToStr(I);
+ if i mod 4 = 0 then
+ RxMemoryData1CODE.Clear
+ else
+ RxMemoryData1CODE.AsInteger:=100 + i * 10;
+ RxMemoryData1.Post;
+
+ end;
+end;
+
+procedure TForm1.CheckBox1Change(Sender: TObject);
+begin
+ Edit1.Enabled:=not CheckBox1.Checked;
+
+ try
+ if CheckBox1.Checked then
+ RxMemoryData1.Filter:=Edit1.Text;
+ RxMemoryData1.Filtered:=CheckBox1.Checked;
+ except
+ on E:Exception do
+ Memo1.Lines.Text:=E.Message;
+ end; mon
+end;
+
+end.
+