windowsforms-devexpress-dot-xtraeditors-dot-repository-4933cde0.md
Contains settings specific to the SearchLookUpEdit control.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXLicenseWinForms]
[RepositoryItemLookUpEditBase.LookupEditCustomBindingProperties("SearchLookUpEdit")]
public class RepositoryItemSearchLookUpEdit :
RepositoryItemGridLookUpEditBase
<RepositoryItemLookUpEditBase.LookupEditCustomBindingProperties("SearchLookUpEdit")>
<DXLicenseWinForms>
Public Class RepositoryItemSearchLookUpEdit
Inherits RepositoryItemGridLookUpEditBase
The following members return RepositoryItemSearchLookUpEdit objects:
The RepositoryItemSearchLookUpEdit class contains settings specific to the SearchLookUpEdit control. You can access these settings via the editor’s SearchLookUpEdit.Properties object. See the SearchLookUpEdit topic, for details on the control.
You need to create repository items as standalone objects only to specify inplace editors for container controls (such as the XtraGrid, XtraTreeList, etc).
Note
You can use the Grid Control and View’s methods only when the drop-down window is open if you want to access the data source and calculated data. To access the View, handle the QueryPopUp or Popup event.
private void gridLookUpEdit1_Properties_QueryPopUp(object sender, CancelEventArgs e) {
// Cast to SearchLookUpEdit or GridLookUpEdit depending on which control you use
GridLookUpEdit gridLookUpEdit = sender as GridLookUpEdit;
gridLookUpEdit.Properties.PopupView.Columns["ID"].Visible = false;
}
Private Sub gridLookUpEdit1_Properties_QueryPopUp(ByVal sender As Object, ByVal e As CancelEventArgs)
' Cast to SearchLookUpEdit or GridLookUpEdit depending on which control you use
Dim gridLookUpEdit As GridLookUpEdit = TryCast(sender, GridLookUpEdit)
gridLookUpEdit.Properties.PopupView.Columns("ID").Visible = False
End Sub
When the drop-down window is closed, use the data source’s methods.
If you customize the View in an event, do not use objects to identify the View, columns, and so on – use field names, captions, etc., instead. The example below shows how to identify a column in a CustomDrawCell event handler.
private void SearchLookUpEdit1View_CustomDrawCell(object sender, >DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) {
if (e.Column.FieldName == "MyFieldName") {
//...
}
}
Private Sub SearchLookUpEdit1View_CustomDrawCell(ByVal sender As Object, ByVal >e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) _
Handles searchLookUpEdit1View.CustomDrawCell
If e.Column.FieldName = "MyFieldName" Then
'...
End If
End Sub
Show 12 items
Object MarshalByRefObject Component DevExpress.XtraEditors.ComponentBase RepositoryItem RepositoryItemTextEdit RepositoryItemButtonEdit RepositoryItemPopupBase RepositoryItemPopupBaseAutoSearchEdit RepositoryItemLookUpEditBase RepositoryItemGridLookUpEditBase RepositoryItemSearchLookUpEdit
See Also