windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-3bee5669.md
Creates an editor whose type corresponds to the repository item’s type.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public virtual BaseEdit CreateEditor()
Public Overridable Function CreateEditor As BaseEdit
| Type | Description |
|---|---|
| BaseEdit |
A BaseEdit descendant representing the editor whose type corresponds to this repository item’s type.
|
Container controls use this method to create editors when end-users start to edit cell values. The method only creates an appropriate editor type and container controls synchronize its settings with the repository item’s values.
You will have no need to use this method in your applications.
The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateEditor() 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.
if (editors.ContainsKey(editorType)) return editors[editorType];
BaseEdit groupEdit = column.RealColumnEdit.CreateEditor();
groupEdit.Parent = view.GridControl;
if(repositoryItemHyperLinkEdit != null) {
HyperLinkEdit editor = (HyperLinkEdit)repositoryItemHyperLinkEdit.CreateEditor();
editor.ShowBrowser(WinHyperLinkStringPropertyEditor.GetResolvedUrl(gv.GetRowCellValue(hi.RowHandle, hi.Column)));
{
ActiveEditor = _Item.CreateEditor();
ActiveEditor.Properties.LockEvents();
End If
Dim groupEdit As BaseEdit = column.RealColumnEdit.CreateEditor()
groupEdit.Parent = view.GridControl
If repositoryItemHyperLinkEdit IsNot Nothing Then
Dim editor As HyperLinkEdit = CType(repositoryItemHyperLinkEdit.CreateEditor(), HyperLinkEdit)
editor.ShowBrowser(WinHyperLinkStringPropertyEditor.GetResolvedUrl(gv.GetRowCellValue(hi.RowHandle, hi.Column)))
Private Sub ShowEditor(ByVal bounds As Rectangle)
ActiveEditor = _Item.CreateEditor()
ActiveEditor.Properties.LockEvents()
See Also