Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PropertyGridControl.CloseEditor() Method

In This Article

Saves the data and closes the editor nested in a focused cell.

Namespace: DevExpress.Xpf.PropertyGrid

Assembly: DevExpress.Xpf.PropertyGrid.v24.2.dll

NuGet Package: DevExpress.Wpf.PropertyGrid

#Declaration

public void CloseEditor()

#Remarks

Use the CloseEditor method to programmatically save the data and close the editor. The CloseEditor method raises the PropertyGridControl.HiddenEditor event.

The CloseEditor method makes the property grid validate the newly entered data. If a new value is valid, it is posted to a data source.

You can use the PropertyGrid’s PropertyGridControl.AllowCommitOnValidationAttributeError property to allow an invalid value to be posted to a data source and the cell focus to be moved to another cell.

To close the active editor and cancel the changes, use the PropertyGridControl.HideEditor method.

See Also