From dad36c73e5589132c5534fb077b32875615f39bc Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Wed, 11 May 2022 18:45:57 -0600 Subject: [PATCH] Expose grid entries --- Source/LibationWinForms/grid/ProductsGrid.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/LibationWinForms/grid/ProductsGrid.cs b/Source/LibationWinForms/grid/ProductsGrid.cs index fc9d11d1..b8b9f235 100644 --- a/Source/LibationWinForms/grid/ProductsGrid.cs +++ b/Source/LibationWinForms/grid/ProductsGrid.cs @@ -37,6 +37,7 @@ namespace LibationWinForms public partial class ProductsGrid : UserControl { + internal event EventHandler LiberateClicked; ImageDisplay imageDisplay; public event EventHandler VisibleCountChanged; @@ -123,7 +124,7 @@ namespace LibationWinForms displayWindow.Show(this); } - private static async Task Liberate_Click(GridEntry liveGridEntry) + private async Task Liberate_Click(GridEntry liveGridEntry) { var libraryBook = liveGridEntry.LibraryBook; @@ -270,6 +271,9 @@ namespace LibationWinForms .Select(row => ((GridEntry)row.DataBoundItem).LibraryBook) .ToList(); + internal IEnumerable AllEntries + => bindingList; + private GridEntry getGridEntry(int rowIndex) => _dataGridView.GetBoundItem(rowIndex); #region Column Customizations