This question is locked. New answers and comments are not allowed.
Hi
When I add following code in constructor the filter works fine.
Now I want change filter at runtime. For test purposes I implement following command:
Now all items are visible. Why?
When I add following code in constructor the filter works fine.
GenericFilterDescriptor<ProposedAppointmentClient> filter =
new
GenericFilterDescriptor<ProposedAppointmentClient>(
(pac) =>
{
return
pac.Worker.Name.Contains(
"Wa"
);
}
);
FilterDescriptors.Add(filter);
Now I want change filter at runtime. For test purposes I implement following command:
private
RelayCommand _setSevdailFilterCommand;
/// <summary>
/// Gets the SetSevdailFilterCommand.
/// </summary>
public
RelayCommand SetSevdailFilterCommand
{
get
{
return
_setSevdailFilterCommand ?? (_setSevdailFilterCommand =
new
RelayCommand(
() =>
{
FilterDescriptors =
null
;
GenericFilterDescriptor<ProposedAppointmentClient> filter =
new
GenericFilterDescriptor<ProposedAppointmentClient>(
(pac) =>
{
return
pac.Worker.Name.Contains(
"Se"
);
}
);
FilterDescriptors =
new
List<GenericFilterDescriptor<ProposedAppointmentClient>>();
FilterDescriptors.Add(filter);
},
() =>
true
));
}
}
Now all items are visible. Why?