Back to Devexpress

RepositoryItemLookUpEdit.Assign(RepositoryItem) Method

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemlookupedit-dot-assign-x28-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-x29.md

latest4.5 KB
Original Source

RepositoryItemLookUpEdit.Assign(RepositoryItem) Method

Copies properties of the source repository item to the current object.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public override void Assign(
    RepositoryItem item
)
vb
Public Overrides Sub Assign(
    item As RepositoryItem
)

Parameters

NameTypeDescription
itemRepositoryItem

The source repository item object.

|

Remarks

The Assign method copies properties and event handlers of the source repository item to the current repository item. The method is used internally and you do not need to call this from your code.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Assign(RepositoryItem) 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-grid-filter-lookup-column-based-on-another-column-editform/CS/FilterLookUpsEditForm/FormDifferentSources.cs#L62

csharp
string type = baseLookUp.EditValue.ToString();
if (type == "0") filteredLookUp.Properties.Assign(ritemVegetables);
if (type == "1") filteredLookUp.Properties.Assign(ritemFruits);

winforms-lookup-display-custom-text-for-not-found-edit-value/CS/Form1.cs#L41

csharp
lookUpEdit1.Properties.Assign(editor);
lookUpEdit1.EditValue = 0;

winforms-lookup-show-custom-tooltips/CS/LookUpEditWithHints/RepositoryItemLookUpEditHints.cs#L53

csharp
BeginUpdate();
base.Assign(item);
RepositoryItemLookUpEditHints source = item as RepositoryItemLookUpEditHints;

winforms-grid-filter-lookup-column-based-on-another-column-editform/VB/FilterLookUpsEditForm/FormDifferentSources.vb#L60

vb
If type = "0" Then
    filteredLookUp.Properties.Assign(ritemVegetables)
End If

winforms-lookup-display-custom-text-for-not-found-edit-value/VB/Form1.vb#L40

vb
gridView1.Columns.AddField("Number").VisibleIndex = 1
lookUpEdit1.Properties.Assign(editor)
lookUpEdit1.EditValue = 0

winforms-lookup-show-custom-tooltips/VB/LookUpEditWithHints/RepositoryItemLookUpEditHints.vb#L70

vb
BeginUpdate()
MyBase.Assign(item)
Dim source As RepositoryItemLookUpEditHints = TryCast(item, RepositoryItemLookUpEditHints)

See Also

RepositoryItemLookUpEdit Class

RepositoryItemLookUpEdit Members

DevExpress.XtraEditors.Repository Namespace