You've already forked lazarus-ccr
in RxDBGrid disable scroll event on calc footer row
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2388 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1835,6 +1835,28 @@ begin
|
|||||||
begin
|
begin
|
||||||
if DataSource.DataSet.OnPostError = @ErrorPo then
|
if DataSource.DataSet.OnPostError = @ErrorPo then
|
||||||
DataSource.DataSet.OnPostError := F_EventOnPostError;
|
DataSource.DataSet.OnPostError := F_EventOnPostError;
|
||||||
|
|
||||||
|
if DataSource.DataSet.OnFilterRecord = @FilterRec then
|
||||||
|
DataSource.DataSet.OnFilterRecord := F_EventOnFilterRec;
|
||||||
|
|
||||||
|
if DataSource.DataSet.BeforeDelete = @BeforeDel then
|
||||||
|
DataSource.DataSet.BeforeDelete := F_EventOnBeforeDelete;
|
||||||
|
|
||||||
|
if DataSource.DataSet.BeforePost = @BeforePo then
|
||||||
|
DataSource.DataSet.BeforePost:=F_EventOnBeforePost;
|
||||||
|
|
||||||
|
if DataSource.DataSet.OnDeleteError = @ErrorDel then
|
||||||
|
DataSource.DataSet.OnDeleteError:=F_EventOnDeleteError;
|
||||||
|
|
||||||
|
if DataSource.DataSet.OnPostError = @ErrorPo then
|
||||||
|
DataSource.DataSet.OnPostError:=F_EventOnPostError;
|
||||||
|
|
||||||
|
F_EventOnPostError:=nil;
|
||||||
|
F_EventOnFilterRec:=nil;
|
||||||
|
F_EventOnBeforeDelete:=nil;
|
||||||
|
F_EventOnBeforePost:=nil;
|
||||||
|
F_EventOnDeleteError:=nil;
|
||||||
|
F_EventOnPostError:=nil;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2207,7 +2229,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
F_SortListField.Clear;
|
F_SortListField.Clear;
|
||||||
if not (csDestroying in ComponentState) and not (csDesigning in ComponentState) then
|
if {not (csDestroying in ComponentState) and} not (csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
if Value then
|
if Value then
|
||||||
begin
|
begin
|
||||||
@ -2975,6 +2997,7 @@ var
|
|||||||
DS: TDataSet;
|
DS: TDataSet;
|
||||||
i: integer;
|
i: integer;
|
||||||
APresent: boolean;
|
APresent: boolean;
|
||||||
|
SEA, SEB:TDataSetNotifyEvent;
|
||||||
begin
|
begin
|
||||||
if (not (FFooterOptions.Active and DatalinkActive)) or (Columns.Count = 0) then
|
if (not (FFooterOptions.Active and DatalinkActive)) or (Columns.Count = 0) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -2996,6 +3019,10 @@ begin
|
|||||||
;
|
;
|
||||||
P := Ds.GetBookMark;
|
P := Ds.GetBookMark;
|
||||||
DS.DisableControls;
|
DS.DisableControls;
|
||||||
|
SEB:=DS.BeforeScroll;
|
||||||
|
SEA:=DS.AfterScroll;
|
||||||
|
DS.BeforeScroll:=nil;
|
||||||
|
DS.AfterScroll:=nil;
|
||||||
try
|
try
|
||||||
DS.First;
|
DS.First;
|
||||||
for i := 0 to Columns.Count - 1 do
|
for i := 0 to Columns.Count - 1 do
|
||||||
@ -3010,6 +3037,8 @@ begin
|
|||||||
finally
|
finally
|
||||||
DS.GotoBookmark(P);
|
DS.GotoBookmark(P);
|
||||||
DS.FreeBookmark(P);
|
DS.FreeBookmark(P);
|
||||||
|
DS.BeforeScroll:=SEB;
|
||||||
|
DS.AfterScroll:=SEA;
|
||||||
DS.EnableControls;
|
DS.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user