-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.vb
23 lines (19 loc) · 1.04 KB
/
Main.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Imports DevExpress.XtraEditors
Namespace DXApplication1
Public Partial Class Main
Inherits XtraForm
Public Sub New()
InitializeComponent()
lookUpEdit1.Properties.PopupFilterMode = PopupFilterMode.Contains
SetupLookUpEditor(gridLookUpEdit1, DataProvider.GetCategoryList(), "ID", "CategoryName")
SetupLookUpEditor(lookUpEdit1, DataProvider.GetProductList(), "ID", "ProductName", gridLookUpEdit1)
SetupLookUpEditor(searchLookUpEdit1, DataProvider.GetOrderList(), "ID", "OrderNumber", lookUpEdit1)
End Sub
Private Sub SetupLookUpEditor(ByVal lookup As LookUpEditBase, ByVal dataSource As Object, ByVal valueMember As String, ByVal displayMember As String, ByVal Optional lookupOwner As LookUpEditBase = Nothing)
lookup.Properties.DataSource = dataSource
lookup.Properties.ValueMember = valueMember
lookup.Properties.DisplayMember = displayMember
lookup.CascadingOwner = lookupOwner
End Sub
End Class
End Namespace