This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml.vb
36 lines (34 loc) · 1.62 KB
/
MainWindow.xaml.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
28
29
30
31
32
33
34
35
36
Imports DevExpress.Xpf.Core.FilteringUI
Imports DevExpress.Xpf.Grid
Imports System.Windows
Namespace CustomFilterPopupExample
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub OnQueryOperators(ByVal sender As Object, ByVal e As FilterEditorQueryOperatorsEventArgs)
If e.FieldName = "Name" Then
e.Operators.Clear()
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.Equal))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.NotEqual))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.Contains))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.StartsWith))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.EndsWith))
e.DefaultOperator = e.Operators(FilterEditorOperatorType.Contains)
ElseIf e.FieldName = "SubscribeNumber" Then
e.Operators.Clear()
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.Equal))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.NotEqual))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.Greater))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.GreaterOrEqual))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.Less))
e.Operators.Add(New FilterEditorOperatorItem(FilterEditorOperatorType.LessOrEqual))
e.DefaultOperator = e.Operators(FilterEditorOperatorType.LessOrEqual)
End If
End Sub
End Class
End Namespace