When I pass the ObservableCollection
and I order it with Linq it does not work but if I pass it directly it works. In SilverLigth it worked passing the ordered list. Why is this?
Silverlight code
ListaAOrdenar = new ObservableCollection<Units>();
Filtro = new PagedCollectionView(ListaAOrdenar.OrderBy(b => b.Unidad).ThenBy(c => c.fecha));
dataGrid.ItemsSource = Filtro;
WPF code
ListaAOrdenar = new ObservableCollection<Units>();
Filtro = new ListCollectionView(ListaAOrdenar.OrderBy(b => b.Unidad).ThenBy(c => c.fecha));
dataGrid.ItemsSource = Filtro;