Skip to main content
A newer version of this page is available. .

BaseView.PostEditor() Method

Saves the modified cell value to the data source. If the GridOptionsView.RowAutoHeight setting is disabled, the currently active cell editor remains opened.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

public bool PostEditor()

Returns

Type Description
Boolean

true if the value has been successfully saved to the data source; otherwise, false.

Remarks

Note

Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the PostEditor member must not be invoked for these Views. The PostEditor member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.

The code sample below illustrates how to save the value of a CheckEdit to the data source.

RepositoryItemCheckEdit checkEdit = new RepositoryItemCheckEdit();
checkEdit.EditValueChanged += repositoryItemCheckEdit_EditValueChanged;
gridControl1.RepositoryItems.Add(checkEdit);
gridView1.Columns["Marked"].ColumnEdit = checkEdit;

private void repositoryItemCheckEdit_EditValueChanged(object sender, System.EventArgs e)
{
    gridView1.PostEditor();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the PostEditor() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also