Edit
This commit is contained in:
parent
89059510fd
commit
3535156ea5
@ -22,12 +22,9 @@ namespace LibationWinForms
|
||||
internal class FilterableSortableBindingList : SortableBindingList<GridEntry>, IBindingListView
|
||||
{
|
||||
/// <summary>
|
||||
/// Items that were removed from the list due to filtering
|
||||
/// Items that were removed from the base list due to filtering
|
||||
/// </summary>
|
||||
private readonly List<GridEntry> FilterRemoved = new();
|
||||
/// <summary>
|
||||
/// Tracks all items in the list, both filtered and not.
|
||||
/// </summary>
|
||||
private string FilterString;
|
||||
private Action Sort;
|
||||
public FilterableSortableBindingList(IEnumerable<GridEntry> enumeration) : base(enumeration)
|
||||
@ -44,8 +41,7 @@ namespace LibationWinForms
|
||||
#region Unused - Advanced Filtering
|
||||
public bool SupportsAdvancedSorting => false;
|
||||
|
||||
|
||||
//This ApplySort overload is only called is SupportsAdvancedSorting is true.
|
||||
//This ApplySort overload if only called is SupportsAdvancedSorting is true.
|
||||
//Otherwise BindingList.ApplySort() is used
|
||||
public void ApplySort(ListSortDescriptionCollection sorts) => throw new NotImplementedException();
|
||||
|
||||
@ -58,6 +54,7 @@ namespace LibationWinForms
|
||||
base.Remove(entry);
|
||||
}
|
||||
|
||||
/// <returns>All items in the list, including those filtered out.</returns>
|
||||
public List<GridEntry> AllItems() => Items.Concat(FilterRemoved).ToList();
|
||||
|
||||
private void ApplyFilter(string filterString)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user