XafApplication.LinkNewObjectToParentImmediately Property

Specifies whether or not a link between a master and child object is created immediately when the NewObjectViewController.NewObjectAction is executed in a nested List View with a non-aggregated collection.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public bool LinkNewObjectToParentImmediately { get; set; }
Public Property LinkNewObjectToParentImmediately As Boolean

Property Value

Type Description
Boolean

true, if the link between a master and child object is created when the child object is committed; false, if the link is created when the parent is committed.

The table below details how the New Action behavior is changed in a nested List View with a non-aggregated collection depending on the LinkNewObjectToParentImmediately value.

Value Description
true The new object linked to the master object is created and the master object is committed when the New Action is executed. The reference to the master object is available in the new child object immediately after creation.
false The master object is not committed and the link is not created when the New Action is executed. The reference to the master object is not added to the new child object immediately. The link is created later, when the child object is committed. To persist the link, a user should also save the master object; otherwise, the unlinked child object will be saved.

Use LinkNewObjectToParentImmediately to change the behavior globally. Alternatively, you can use the NewObjectViewController.LinkNewObjectToParentImmediately property to change the behavior for a specific View. The behavior of aggregated collections is not changed.

By default, LinkNewObjectToParentImmediately is set to true in XafApplication code. However, the default value is overridden to false in code generated by the Solution Wizard. This is done to keep the behavior of applications created in earlier versions unchanged.

Tip

This property is hidden in the Application Designer. You can use it only in code.

See Also