Hi,
I'm searching for a solution to filter the source immediately when the user types in the filter criteria. This is my declaration in my xaml:
In my codebehind I delete some filter operators and set a default operator for each column when the FilterOperatorsLoading event is fired:
So, if the user types in some filter criterias, I want the underlying source to be immediately refreshed every time the criteria changes without pressing the return button.
I tryed to set IsFilteringDeferred to false and true for some columns, but that doesn't seem to make a difference. The behavior is always the same: I have to press return to refresh the source.
Kind regards
I'm searching for a solution to filter the source immediately when the user types in the filter criteria. This is my declaration in my xaml:
<
telerik:RadGridView
Name
=
"grvKanten"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
CanUserReorderColumns
=
"True"
FilteringMode
=
"FilterRow"
FilterOperatorsLoading
=
"grvKanten_FilterOperatorsLoading"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Name
=
"colKantenname"
DataMemberBinding
=
"{Binding Kantenname}"
Header
=
"Kantenname"
MinWidth
=
"150"
/>
<
telerik:GridViewDataColumn
Name
=
"colKantenbreitenname"
DataMemberBinding
=
"{Binding Kantenbreitenname}"
Header
=
"Kantenbreiten-Name"
MinWidth
=
"150"
/>
<
telerik:GridViewDataColumn
Name
=
"colLagerplatz"
DataMemberBinding
=
"{Binding Lagerplatzname}"
Header
=
"Lagerplatz"
MinWidth
=
"150"
/>
<
telerik:GridViewDataColumn
Name
=
"colLaenge"
DataMemberBinding
=
"{Binding Laenge}"
Header
=
"Länge"
MinWidth
=
"100"
/>
<
telerik:GridViewDataColumn
Name
=
"colDekor"
DataMemberBinding
=
"{Binding Dekor}"
Header
=
"Dekor"
MinWidth
=
"100"
/>
<
telerik:GridViewDataColumn
Name
=
"colBreie"
DataMemberBinding
=
"{Binding Breite}"
Header
=
"Kantenbreite"
MinWidth
=
"100"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
In my codebehind I delete some filter operators and set a default operator for each column when the FilterOperatorsLoading event is fired:
Private Sub grvKanten_FilterOperatorsLoading(sender As System.Object, e As Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.EndsWith)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsContainedIn)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsEmpty)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsEqualTo)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsGreaterThanOrEqualTo)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsLessThanOrEqualTo)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotEmpty)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotEqualTo)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotNull)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNull)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.StartsWith)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsLessThan)
e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsGreaterThan)
e.DefaultOperator1 = Telerik.Windows.Data.FilterOperator.Contains
End Sub
So, if the user types in some filter criterias, I want the underlying source to be immediately refreshed every time the criteria changes without pressing the return button.
I tryed to set IsFilteringDeferred to false and true for some columns, but that doesn't seem to make a difference. The behavior is always the same: I have to press return to refresh the source.
Kind regards