Hi,
We're just implementing Telerik controls in our WPF (PRISM) application and having some problems with the DataFilter control.
We have a radgrid and can bind the control to the grid and filter without any problems. However, the requirement is display 3 filterable fields when the screen loads and for only 3 fields out of a possible 8 of the grid view.
So we're trying to go down the FilterDescriptions route and define our 3 filters programatically
However when we do this it throws an error saying the source isn't IEnumerable. The source in this instance is defined in the XAML as the radgrid, which has loaded an IList<Receiver> object, which last time I checked was IEnumerable.
Even if I set the Datasource programatically to a List<Receiver> still get the same error.
I'm not sure where to turn and thinking maybe Data annotations are an option.
Any views?
Thanks.
We're just implementing Telerik controls in our WPF (PRISM) application and having some problems with the DataFilter control.
We have a radgrid and can bind the control to the grid and filter without any problems. However, the requirement is display 3 filterable fields when the screen loads and for only 3 fields out of a possible 8 of the grid view.
So we're trying to go down the FilterDescriptions route and define our 3 filters programatically
var companyFilter = new FilterDescriptor("Receiver Company", FilterOperator.Contains, "", true);
radDataFilter.FilterDescriptors.Add(companyFilter);
var addressFilter = new FilterDescriptor("Address Line 1", FilterOperator.Contains, "", true);
radDataFilter.FilterDescriptors.Add(addressFilter);
//// DateTime filter.
var dateFilter = new FilterDescriptor("Created Date", FilterOperator.IsGreaterThan,
new DateTime(2007, 5, 1));
radDataFilter.FilterDescriptors.Add(dateFilter);
However when we do this it throws an error saying the source isn't IEnumerable. The source in this instance is defined in the XAML as the radgrid, which has loaded an IList<Receiver> object, which last time I checked was IEnumerable.
Even if I set the Datasource programatically to a List<Receiver> still get the same error.
I'm not sure where to turn and thinking maybe Data annotations are an option.
Any views?
Thanks.