void _mergeData_SortChanging(object sender, SortChangingEventArgs e) { if (e.Sort != null && !e.Sort.OfType<ListSortDescription>().Any(d => d.PropertyDescriptor.Name == "Path")) { e.Sort = new ListSortDescriptionCollection(e.Sort.OfType<ListSortDescription>().Concat(_mergeData.SortDescriptors("Path")).ToArray()); e.Handled = true; } }
void _mergeData_SortChanging(object sender, SortChangingEventArgs e) { if (e.Sort != null && !e.Sort.OfType <ListSortDescription>().Any(d => d.PropertyDescriptor.Name == "Path")) { e.Sort = new ListSortDescriptionCollection(e.Sort.OfType <ListSortDescription>().Concat(_mergeData.SortDescriptors("Path")).ToArray()); e.Handled = true; } }