All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

PGridOptionsBehavior.RefreshOnSelectedObjectChanges Property

Gets or sets whether the control automatically updates the content when the selected object's property changes.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool RefreshOnSelectedObjectChanges { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property RefreshOnSelectedObjectChanges As Boolean

Property Value

Type Default Description
Boolean

true

true, if the control updates the content when the selected object's property changes; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to RefreshOnSelectedObjectChanges
PropertyGridControl
.OptionsBehavior.RefreshOnSelectedObjectChanges

Remarks

If the selected object (see SelectedObject, SelectedObjects) supports the INotifyPropertyChanged interface, the control automatically updates its content when a property changes. Set the RefreshOnSelectedObjectChanges property to false to prevent the automatic updates. To refresh the content manually, call the Refresh() or UpdateRows() method.

Examples

The code below shows how the INotifyPropertyChanged interface can be implemented. Since the RefreshOnSelectedObjectChanges property is set to false, the control does not update the content when the selected object changes.

propertyGridControl1.SelectedObject = new MyObject();
propertyGridControl1.OptionsBehavior.RefreshOnSelectedObjectChanges = false;

public class MyObject : INotifyPropertyChanged {
    object myProperty;
    public object MyProperty {
        get {
            return myProperty;
        }
        set {
            myProperty = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("MyProperty"));
        }
    }
    public event PropertyChangedEventHandler PropertyChanged;
}
See Also