Master Detail relation, Detail Full Refresh after update

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flyy
Posts: 17
Joined: Fri 18 Sep 2009 08:34

Master Detail relation, Detail Full Refresh after update

Post by flyy » Fri 25 Dec 2009 11:00

hi,

I had a master detail relation in my project. I set up master source etc. I want to Full refresh in detail dataset after update of Master dataset. is there a way on dataset to accomplish that

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 28 Dec 2009 08:15

When you change the key field in master dataset, detail dataset is automatically refreshed. If you want to refresh the detail dataset after any master field is changed, use the AfterPost event for the master and call the Refresh method for the detail dataset in this event.

guto1234
Posts: 3
Joined: Wed 21 Apr 2010 21:56

It is not true if you are inserting a master record

Post by guto1234 » Thu 22 Apr 2010 00:15

Plash wrote:When you change the key field in master dataset, detail dataset is automatically refreshed. If you want to refresh the detail dataset after any master field is changed, use the AfterPost event for the master and call the Refresh method for the detail dataset in this event.
If you are inserting a master record, previously inserted detail records are not refreshed wher you fill the masterfield. It is incredible this is happening, since there are many situations this may be necessary.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 22 Apr 2010 08:07

See discussion in the following thread
http://www.devart.com/forums/viewtopic. ... 5944#55944

Post Reply