Ejemplo n.º 1
0
 protected override void OnSorting(DataGridSortingEventArgs eventArgs)
 {
     var column = eventArgs.Column;
     var direction = (column.SortDirection != ListSortDirection.Ascending)
                                       ? ListSortDirection.Ascending
                                       : ListSortDirection.Descending;
     column.SortDirection = direction;
     var lcv = (ListCollectionView)CollectionViewSource.GetDefaultView(ItemsSource);
     var mySort = new MySort(direction, column);
     lcv.CustomSort = mySort;
 }
Ejemplo n.º 2
0
        protected override void OnSorting(DataGridSortingEventArgs eventArgs)
        {
            var column    = eventArgs.Column;
            var direction = (column.SortDirection != ListSortDirection.Ascending)
                                              ? ListSortDirection.Ascending
                                              : ListSortDirection.Descending;

            column.SortDirection = direction;
            var lcv    = (ListCollectionView)CollectionViewSource.GetDefaultView(ItemsSource);
            var mySort = new MySort(direction, column);

            lcv.CustomSort = mySort;
        }