-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.vb
27 lines (22 loc) · 875 Bytes
/
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
24
25
26
27
Imports System.ComponentModel
Imports System.Drawing
Imports DevExpress.Data.Linq
Imports DevExpress.XtraEditors
Namespace LinqServerMode
Public Partial Class Main
Inherits XtraForm
Public Sub New()
InitializeComponent()
linqInstantFeedbackSource.KeyExpression = "SupplierID"
gridControl1.DataSource = linqInstantFeedbackSource
End Sub
Private Sub OnGetQueryable(ByVal sender As Object, ByVal e As GetQueryableEventArgs)
Dim dt As NorthwindClassesDataContext = New NorthwindClassesDataContext()
e.QueryableSource = dt.Suppliers
e.Tag = dt
End Sub
Private Sub OnDismissQueryable(ByVal sender As Object, ByVal e As GetQueryableEventArgs)
TryCast(e.Tag, NorthwindClassesDataContext).Dispose()
End Sub
End Class
End Namespace