Back to Devexpress

DataViewBase.ShowEditor(Boolean) Method

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-dot-showeditor-x28-system-dot-boolean-x29.md

latest2.7 KB
Original Source

DataViewBase.ShowEditor(Boolean) Method

Activates the focused cell’s inplace editor.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public virtual void ShowEditor(
    bool selectAll
)
vb
Public Overridable Sub ShowEditor(
    selectAll As Boolean
)

Parameters

NameTypeDescription
selectAllBoolean

true to select the editor’s content; otherwise, false.

|

Remarks

Note

Cell editors can be activated if the view’s DataViewBase.AllowEditing property is set to true and the DataViewBase.NavigationStyle property is set to GridViewNavigationStyle.Cell.

To invoke the cell’s editor in code, you should focus the cell and call the ShowEditor method:

csharp
tableView.MoveLastRow();
tableView.Grid.CurrentColumn = tableView.Grid.Columns[0];
Dispatcher.BeginInvoke(new Action(() => {
    tableView.ShowEditor();
}), DispatcherPriority.Render);

Refer to Focusing for information on how to move cell and row focus.

The ShowEditor method raises the GridViewBase.ShowingEditor event. This event allows you to prevent showing editors for individual cells, thus preventing their values from being edited. After the editor has been shown, the GridControl raises the GridViewBase.ShownEditor event.

See Also

Edit Cell Values in UI

HideEditor()

CloseEditor()

PostEditor()

ActiveEditor

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace