Add a RadFilterView and a RadGridView. Associate the two controls and add programmatically FilterDescriptors to the RadFilterView control. The UI doesn't show any filtering applied.
Me.RadFilterView1.FilterViewElement.LoadCategoriesAsync = False
Me.RadGridView1.DataSource = Me.ProductsBindingSource
Me.RadGridView1.EnableFiltering = True
Me.RadGridView1.ShowFilteringRow = False
AddHandler Me.RadFilterView1.FilterChanged, AddressOf Me.RadFilterView1_FilterChanged
AddHandler Me.RadFilterView1.FilterViewElement.CategoryCreating, AddressOf Me.FilterViewElement_CategoryCreating
AddHandler Me.RadFilterView1.FilterViewElement.CategoryCreated, AddressOf Me.FilterViewElement_CategoryCreated
Me.RadFilterView1.AssociatedControl = Me.RadGridView1
Dim filter As New FilterDescriptor With {
.PropertyName = "ProductID",
.Operator = FilterOperator.IsLessThanOrEqualTo,
.Value = 5,
.IsFilterEditor = True
}
Dim filter2 As New FilterDescriptor With {
.PropertyName = "CategoryID",
.Operator = FilterOperator.IsLessThanOrEqualTo,
.Value = 4,
.IsFilterEditor = True
}
Me.RadFilterView1.FilterDescriptors.AddRange(filter, filter2)