Subject | Re: [IBO] OnGetCanScroll without exception |
---|---|
Author | Woody |
Post date | 2007-03-13T17:00:23Z |
From: "tomjanczkadao" <tomjancz@...>
boolean when I need control like this.
var
AllowPosting: boolean;
AllowPosting := false;
in the BeforePost event:
if not AllowPosting then
SysUtils.Abort
else
AllowPosting := false;
Whenever you want to allow the data to be saved, simply set AllowPosting to
true.
HTH
Woody (TMW)
> I don't want changes made to dataset to be Auto-Posted if user scrollsWhy not just use the BeforePost event? I generally use an update flag
> the dataset (eg accidentally by clicking on the grid). Either Abort
> scroll if dataset is in dssEdit/dssInsert or Cancel changes before scroll.
> I've just found that First/Last DO fire OnBeforeScroll but
> unfortunately Posts chagnes before fire OnBeforeScroll - is it a bug??.
boolean when I need control like this.
var
AllowPosting: boolean;
AllowPosting := false;
in the BeforePost event:
if not AllowPosting then
SysUtils.Abort
else
AllowPosting := false;
Whenever you want to allow the data to be saved, simply set AllowPosting to
true.
HTH
Woody (TMW)