Back to Devexpress

SpreadsheetControl.OpenCellEditor(CellEditorMode) Method

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-dot-opencelleditor-x28-devexpress-dot-xtraspreadsheet-dot-celleditormode-x29.md

latest3.7 KB
Original Source

SpreadsheetControl.OpenCellEditor(CellEditorMode) Method

Invokes a cell editor and switches to the spreadsheet edit mode, allowing you to edit cell content.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public bool OpenCellEditor(
    CellEditorMode mode
)
vb
Public Function OpenCellEditor(
    mode As CellEditorMode
) As Boolean

Parameters

NameTypeDescription
modeCellEditorMode

A CellEditorMode that specifies the editor and the mode in which it is activated.

|

Returns

TypeDescription
Boolean

true if the cell editor is active; otherwise, false.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the OpenCellEditor(CellEditorMode) 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.

winforms-spreadsheet-control-create-a-data-entry-form/CS/DataEntryFormSample/MainForm.cs#L51

csharp
if (editors.Count == 1)
        spreadsheetControl1.OpenCellEditor(CellEditorMode.Edit);
}

winforms-spreadsheet-use-custom-cell-editors/CS/DevAVInvoicing/Form1.cs#L129

csharp
if (editors.Count == 1)
        spreadsheetControl1.OpenCellEditor(DevExpress.XtraSpreadsheet.CellEditorMode.Edit);
}

winforms-spreadsheet-control-create-a-data-entry-form/VB/DataEntryFormSample/MainForm.vb#L77

vb
If editors.Count = 1 Then
    spreadsheetControl1.OpenCellEditor(CellEditorMode.Edit)
End If

winforms-spreadsheet-use-custom-cell-editors/VB/DevAVInvoicing/Form1.vb#L119

vb
Dim editors As IList(Of CustomCellInplaceEditor) = sheet.CustomCellInplaceEditors.GetCustomCellInplaceEditors(sheet.Selection)
    If editors.Count = 1 Then spreadsheetControl1.OpenCellEditor(CellEditorMode.Edit)
End If

See Also

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace