Модераторы: alexs, Модераторы
Index: rxdbgrid_findunit.pas
===================================================================
--- rxdbgrid_findunit.pas (revision 7987)
+++ rxdbgrid_findunit.pas (working copy)
@@ -60,7 +60,9 @@
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
+ procedure RadioGroup1SelectionChanged(Sender: TObject);
private
+ FirstSearch: Boolean;
FGrid:TRxDBGrid;
FDataSet:TDataSet;
procedure SetGrid(AGrid:TRxDBGrid);
@@ -121,6 +123,12 @@
ComboBox1.Enabled:=RadioButton1.Checked;
end;
+procedure TrxDBGridFindForm.RadioGroup1SelectionChanged(Sender: TObject);
+begin
+ if RadioGroup1.ItemIndex = 0 then
+ FirstSearch:=True;
+end;
+
procedure TrxDBGridFindForm.BtnFindClick(Sender: TObject);
var
FieldName, S:string;
@@ -152,6 +160,11 @@
{$ELSE}
P:=FDataSet.Bookmark;
{$ENDIF}
+ If SearchOrigin = rsdAll Then
+ If FirstSearch then
+ FDataSet.First
+ else
+ FDataSet.Next;
if SearchOrigin = rsdForward then
FDataSet.Next
else
@@ -180,6 +193,7 @@
if not R then
FDataSet.Bookmark:=P;
{$ENDIF}
+ FirstSearch := False;
end;
end;
end;
@@ -200,6 +214,8 @@
end;
ComboBox1.ItemIndex:=ComboBox1.Items.IndexOf(AGrid.SelectedColumn.Title.Caption);
+ CheckBox1.Checked := Not (loCaseInsensitive In AGrid.SearchOptions.QuickSearchOptions);
+ CheckBox2.Checked := loPartialKey In AGrid.SearchOptions.QuickSearchOptions;
end;
FDataSet:=nil;
Index: rxdbutils.pas
===================================================================
--- rxdbutils.pas (revision 7987)
+++ rxdbutils.pas (working copy)
@@ -539,8 +539,6 @@
try
if SearchOrigin in [rsdAll, rsdForward] then
begin
- if SearchOrigin = rsdAll then
- DataSet.First;
while not DataSet.EOF do
begin
Result := CompareRecord;
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 14