How to filter the source list of the gantt through a CollectionViewSource?
You could, optionally, let a CollectionViewSource manage your source list and bind it's View to the FlexyGantt as follows.
ObservableCollection<Team> source = SampleResourcesData.GetSampleData(); cvs = new CollectionViewSource(); cvs.Source = source; cvs.Filter += cvs_Filter; this.fxgantt.ItemsSource = cvs.View; |
And in the Filter handler, apply your custom filters:
void cvs_Filter(object sender, FilterEventArgs e) { Team team = e.Item as Team; if (team.TName.Contains("1")) e.Accepted = true; else e.Accepted = false; } |
The filtered view can then be seen in the gantt.
� RadiantQ 2009 - 2019. All Rights Reserved.