Back to Devexpress

DataViewBase.PostEditor() Method

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-60597388.md

latest2.8 KB
Original Source

DataViewBase.PostEditor() Method

Saves the active editor’s value to a data source without closing the editor.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public void PostEditor()
vb
Public Sub PostEditor

Remarks

Before the active editor’s new value is posted to a data source, it is validated. If a new value is valid, it is posted to a data source and the editor can be closed. Otherwise, if a new value is invalid, the value isn’t posted to a data source, and the editor cannot be closed until its value is corrected.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/MainWindow.xaml.cs#L41

csharp
private void TableView_CellValueChanging(object sender, Xpf.Grid.CellValueChangedEventArgs e) {
    (sender as TableView).PostEditor();
}

wpf-grid-sync-isnodeexpanded-with-view-model/VB/DevExpress.Example04/MainWindow.xaml.vb#L43

vb
Private Sub TableView_CellValueChanging(ByVal sender As Object, ByVal e As Xpf.Grid.CellValueChangedEventArgs)
    TryCast(sender, TableView).PostEditor()
End Sub

See Also

Edit Cell Values in UI

CloseEditor()

HideEditor()

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace