Mini Kabibi Habibi
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Data
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpf.Grid
Imports DevExpress.Xpf.DemoBase
Namespace GridDemo
<CodeFile("ModuleResources/FilteringTemplates(.SL).xaml"), CodeFile("ModuleResources/FilteringClasses.(cs)")> _
Partial Public Class Filtering
Inherits GridDemoModule
Public Sub New()
InitializeComponent()
grid.FilterCriteria = New BinaryOperator("City", "Bergamo", BinaryOperatorType.Equal)
grid.FilterCriteria = New BinaryOperator("OrderDate", New DateTime(1995, 1, 1), BinaryOperatorType.GreaterOrEqual)
AddHandler showFilterPanelModeListBox.EditValueChanged, AddressOf showFilterPanelModeListBox_SelectionChanged
End Sub
Private Sub showFilterPanelModeListBox_SelectionChanged(ByVal sender As Object, ByVal e As DevExpress.Xpf.Editors.EditValueChangedEventArgs)
UpdateShowFilterPanelMode()
End Sub
Private Sub UpdateShowFilterPanelMode()
If showFilterPanelModeListBox.SelectedIndex = 0 Then
grid.View.ShowFilterPanelMode = ShowFilterPanelMode.Default
End If
If showFilterPanelModeListBox.SelectedIndex = 1 Then
grid.View.ShowFilterPanelMode = ShowFilterPanelMode.ShowAlways
End If
If showFilterPanelModeListBox.SelectedIndex = 2 Then
grid.View.ShowFilterPanelMode = ShowFilterPanelMode.Never
End If
End Sub
End Class
End Namespace