Is there a filtering option anywhere in XamDataTree?
Ordinary TreeView has TreeView.Items.Filter, but I couldn't find anything like that here.
Thanks in advance.
At this time the only way to do this is to apply filtering on the collection used for the ItemsSource, for example if you were using a CollectionView you would apply the filtering to that. The XamDataTree will respect the filtering applied to the collection and only show the items that should be shown.
I am going to submit a new feature request for an implementation of filtering through the XamDataTree rather than having to perform it on the collection.
Infragistics Team,
"At this time the only way to do this is to apply filtering on the collection used for the ItemsSource"
We are using version 15.2, if there a more direct way to apply a filter? Same behavior as provided by Infragistics in the grid layout, but executed in code.
We are customize the default filter and need to be able set this in code.
http://www.infragistics.com/help/wpf/xamdatapresenter-add-filter-conditions
Can you provide a working example based on this link?
Regards,
Michael
Citigroup
Based on this link, it was added in 15.1.
http://www.infragistics.com/community/blogs/blagunas/archive/2015/04/13/what-s-new-in-infragistics-wpf-15-1.aspx
Please provide a working example in code.
Update: I was able to create a RowFilter based on this Link: http://www.infragistics.com/help/wpf/xamdatapresenter-add-filter-conditions
Thank you Infragistics :-)
How can I apply multiple filters to the same FieldName?
When I commented out the code below the view is blank.
Snippet:
private void ButtonBaseOnClickFilter(object sender, RoutedEventArgs e)
{
//// this.xtgBlotter.FieldLayouts[0].RecordFilters.Add(GenerateRecordFilter("CurrencyPair", ComparisonOperator.Contains, "USD"));
this.xtgBlotter.FieldLayouts[0].RecordFilters.Add(GenerateRecordFilter("CurrencyPair", ComparisonOperator.Equals, "CAD/JPY"));
}
private RecordFilter GenerateRecordFilter(string fieldName, ComparisonOperator comparisonOperator, string key)
var recordFilter = new RecordFilter { FieldName = fieldName };
var comparisonCondition = new ComparisonCondition(comparisonOperator, key);
recordFilter.Conditions.Add(comparisonCondition);
recordFilter.Conditions.LogicalOperator = LogicalOperator.Or;
return recordFilter;