private void PerformCustomSort(DataGridColumn column)
        {
            Field         field         = (Field)column.GetValue(DataGridExtensions.FieldProperty);
            SortDirection sortDirection = column.SortDirection == ListSortDirection.Ascending ? SortDirection.Ascending : SortDirection.Descending;

            if ((Keyboard.Modifiers & ModifierKeys.Shift) == 0)
            {
                trackListSort.Clear();
            }

            SortField sortFieldFound = trackListSort.FirstOrDefault(x => x.Field == field);

            if (sortFieldFound != null)
            {
                sortFieldFound.SortDirection = sortDirection;
            }
            else
            {
                trackListSort.Add(new SortField(field, sortDirection));
            }

            ListSortDirection direction = (column.SortDirection != ListSortDirection.Ascending) ? ListSortDirection.Ascending : ListSortDirection.Descending;

            column.SortDirection = direction;
            ListCollectionView lcv    = (ListCollectionView)CollectionViewSource.GetDefaultView(dataGrid.ItemsSource);
            MyMusicTableSort   mySort = new MyMusicTableSort(DataBase, dataGrid, this.trackListFields, this.trackListSort);

            lcv.CustomSort = mySort;    // provide our own sort
        }
        void bwTrackList_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            SafeObservableCollection <MyMusicListItem> items = e.Result as SafeObservableCollection <MyMusicListItem>;

            ListCollectionView lcv = new ListCollectionView(items);

            lcv.Filter = FilterRow;

            if (GroupBy != null && GroupBy.Count > 0)
            {
            }

            dataGrid.ItemsSource = lcv;

            LoadSorting();

            MyMusicTableSort mySort = new MyMusicTableSort(DataBase, dataGrid, this.trackListFields, this.trackListSort);

            lcv.CustomSort = mySort;    // provide our own sort

            if (dataGrid.Items.Count > 0)
            {
                dataGrid.UpdateLayout();
                dataGrid.ScrollIntoView(dataGrid.Items[0]);
            }

            if (FillListCompleted != null)
            {
                FillListCompleted(this, new EventArgs());
            }

            SaveDataGridColumnWidths();


            //UpdateStatusBar();
        }