Board index » delphi » Automatic Posting?

Automatic Posting?

I have a problem when editing a record in the DBGrid.  When I click on the
next field instead of using the tab or cursor keys, the TDataSet
automatically attempts to post the record.  Is there a property that would
have turned this on, or is there on to turn this off?

I've checked and I don't see any code adding this 'feature'.  I'm creating
everything at runtime except the DBGrid, so pretty much everything is
default.

Any help would be appreciated.  If this is the wrong newsgroup, please point
me at the right one.

Thanks.
Paul

 

Re:Automatic Posting?


AFAIK, a TDbGrid will always Post a record when you move from one record to
another, be it with a key or the mouse.

If you do not want these changes 'posted' to the database, then you must use
either cached updates or better ClientDataSets.

Regards

Roger Graham

"Paul G. Gardner" <p.gard...@stanleyassociates.com> wrote in message
news:3bf15c6f$1_2@dnews...

Quote
> I have a problem when editing a record in the DBGrid.  When I click on the
> next field instead of using the tab or cursor keys, the TDataSet
> automatically attempts to post the record.  Is there a property that would
> have turned this on, or is there on to turn this off?

> I've checked and I don't see any code adding this 'feature'.  I'm creating
> everything at runtime except the DBGrid, so pretty much everything is
> default.

> Any help would be appreciated.  If this is the wrong newsgroup, please
point
> me at the right one.

> Thanks.
> Paul

Re:Automatic Posting?


Roger,

Thanks for the answer.  Right now, the changes are being posted even if I
click on another field on the same record.  The post when the user selects
another record works like a charm, and I don't want to change that.  Sorry,
my original description isn't very clear.

Quote
"Roger Graham" <rgra...@designkey.co.uk> wrote in message

news:3bf16ac3_1@dnews...
Quote
> AFAIK, a TDbGrid will always Post a record when you move from one record
to
> another, be it with a key or the mouse.

> If you do not want these changes 'posted' to the database, then you must
use
> either cached updates or better ClientDataSets.

> Regards

> Roger Graham

> "Paul G. Gardner" <p.gard...@stanleyassociates.com> wrote in message
> news:3bf15c6f$1_2@dnews...
> > I have a problem when editing a record in the DBGrid.  When I click on
the
> > next field instead of using the tab or cursor keys, the TDataSet
> > automatically attempts to post the record.  Is there a property that
would
> > have turned this on, or is there on to turn this off?

> > I've checked and I don't see any code adding this 'feature'.  I'm
creating
> > everything at runtime except the DBGrid, so pretty much everything is
> > default.

> > Any help would be appreciated.  If this is the wrong newsgroup, please
> point
> > me at the right one.

> > Thanks.
> > Paul

Re:Automatic Posting?


Quote
In article <3bf1aaab$1_2@dnews>, Paul G. Gardner wrote:
> Right now, the changes are being posted even if I
> click on another field on the same record.

I would check on the dataset and datasource event handlers, as I suspect
one of them is implicitly causing the post.

Mike Orriss (TeamB and DevExpress)

Other Threads