Back to Devexpress

ImmediatePostDataAttribute Class

expressappframework-devexpress-dot-persistent-dot-base-fb716efc.md

latest4.3 KB
Original Source

ImmediatePostDataAttribute Class

An attribute you can apply to business class properties. This attribute indicates that the Property Editor’s control value should be passed to the property of a bound object as soon as possible when a user changes the editor’s value.

Namespace : DevExpress.Persistent.Base

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
public sealed class ImmediatePostDataAttribute :
    ModelExportedValueAttribute
vb
<AttributeUsage(AttributeTargets.Property, Inherited:=True, AllowMultiple:=False)>
Public NotInheritable Class ImmediatePostDataAttribute
    Inherits ModelExportedValueAttribute

Remarks

The following code snippet applies the ImmediatePostData attribute to a business class property. For example, this property allows you to force an update of other values that are calculated based on the current property.

csharp
using DevExpress.Persistent.Base;
// ...
[ImmediatePostData]
public double Rate {
    get {
        //...
    }
    set {
        //...           
    }
}

Impact on Other Properties

When you apply the ImmediatePostData attribute to a business class property, you automatically set the Application Model‘s BOModel | <Class> | OwnMembers | <Member> | ImmediatePostData default property value to true.

Note that you can set or change this property’s value using the Model Editor as shown in the Make a Property Calculable topic.

Any changes to the BOModel | <Class> | OwnMembers | <Member> | ImmediatePostData property value affect the default value of the same property in the following nodes:

  • Views | <DetailView> | Items | <PropertyEditor> ,
  • Views | <ListView> | Columns | <Column>.

You can modify the property’s value in the nodes above to, for example, disable ImmediatePostData for certain Views.

These nodes’ ImmediatePostData properties specify the default values for the corresponding PropertyEditor.ImmediatePostData properties.

The diagram below demonstrates different levels where the ImmediatePostData setting can be applied. Higher levels determine default values for lower levels.

Limitations

  • In Batch edit mode, ImmediatePostData affects properties of the current row only.

Inheritance

Object Attribute DevExpress.Persistent.Base.ModelExportedValueAttribute ImmediatePostDataAttribute

See Also

ImmediatePostDataAttribute Members

ImmediatePostData

DevExpress.Persistent.Base Namespace