Expose a way to insert ad hoc library books to grid
This commit is contained in:
parent
58102acd35
commit
bca8c3865b
@ -107,6 +107,11 @@ namespace LibationWinForms
|
||||
|
||||
#endregion
|
||||
|
||||
private SortableBindingList<GridEntry> bindingList;
|
||||
|
||||
/// <summary>Insert ad hoc library books to top of grid</summary>
|
||||
public void AddToTop(DataLayer.LibraryBook libraryBook) => bindingList.Insert(0, new GridEntry(libraryBook));
|
||||
|
||||
#region UI display functions
|
||||
|
||||
private bool hasBeenDisplayed = false;
|
||||
@ -145,7 +150,8 @@ namespace LibationWinForms
|
||||
.ToList();
|
||||
|
||||
// BIND
|
||||
gridEntryBindingSource.DataSource = new SortableBindingList<GridEntry>(orderedGridEntries);
|
||||
bindingList = new SortableBindingList<GridEntry>(orderedGridEntries);
|
||||
gridEntryBindingSource.DataSource = bindingList;
|
||||
|
||||
// FILTER
|
||||
Filter();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user