ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/ibcontrols/DBControlGrid.pas
(Generate patch)

Comparing ibx/trunk/ibcontrols/DBControlGrid.pas (file contents):
Revision 26 by tony, Fri Mar 13 10:26:52 2015 UTC vs.
Revision 27 by tony, Tue Apr 14 13:10:23 2015 UTC

# Line 158 | Line 158 | type
158      function  GridCanModify: boolean;
159      procedure DoDrawRow(aRow: integer; aRect: TRect; aState: TGridDrawState);
160      procedure DoMoveRecord(Data: PtrInt);
161 +    procedure DoSelectNext(Data: PtrInt);
162      procedure DoScrollDataSet(Data: PtrInt);
163      procedure DoSetupDrawPanel(Data: PtrInt);
164      procedure DoSendMouseClicks(Data: PtrInt);
# Line 672 | Line 673 | begin
673    end;
674    FLastRecordCount := GetRecordCount;
675    if aDataSet.State = dsInsert then
676 +  begin
677      FRequiredRecNo := aDataSet.RecNo + 1;
678 +    Application.QueueAsyncCall(@DoSelectNext,0);
679 +  end;
680    UpdateActive
681   end;
682  
# Line 1066 | Line 1070 | begin
1070    FDataLink.DataSet.MoveBy(integer(Data) - FDataLink.DataSet.RecNo);
1071   end;
1072  
1073 + procedure TDBControlGrid.DoSelectNext(Data: PtrInt);
1074 + begin
1075 +  FDataLink.DataSet.MoveBy(1);
1076 + end;
1077 +
1078   procedure TDBControlGrid.DrawAllRows;
1079   begin
1080    inherited DrawAllRows;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines