Back to Devexpress

RepositoryItemButtonEdit.OwnerEdit Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitembuttonedit-f6662a67.md

latest3.5 KB
Original Source

RepositoryItemButtonEdit.OwnerEdit Property

Returns an editor which owns the current repository item object.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public ButtonEdit OwnerEdit { get; }
vb
<Browsable(False)>
Public ReadOnly Property OwnerEdit As ButtonEdit

Property Value

TypeDescription
ButtonEdit

A ButtonEdit control owning the current repository item.

|

Remarks

The OwnerEdit property returns the editor, which owns the current repository item. You can use the OwnerEdit property to return the edit value, for instance. For this purpose, see the editor’s BaseEdit.EditValue property.

In the current object model, every edit control has a Properties property representing a repository item object. Repository items are designed to store settings specific to corresponding editors and provide them for creating inplace editors (in XtraGrid, for instance). Thus, every editor owns the repository item, which stores specific settings.

However, a repository item object can exist without an edit control. This is true for standalone repository items used to create inplace editors. The OwnerEdit property in this case returns null because no editor is currently associated with these items.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the OwnerEdit property.

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-custom-buttonedit-display-editvalue-on-button/CS/TestMyButtonEdit/RepositoryItemMyButtonEdit.cs#L30

csharp
{
    return base.OwnerEdit as MyButtonEdit;
}

winforms-custom-buttonedit-display-editvalue-on-button/VB/TestMyButtonEdit/RepositoryItemMyButtonEdit.vb#L23

vb
Get
    Return TryCast(MyBase.OwnerEdit, MyButtonEdit)
End Get

See Also

RepositoryItemButtonEdit Class

RepositoryItemButtonEdit Members

DevExpress.XtraEditors.Repository Namespace