diff --git a/LibationWinForms/ProductsGrid.cs b/LibationWinForms/ProductsGrid.cs index 238f102d..4b9f9c03 100644 --- a/LibationWinForms/ProductsGrid.cs +++ b/LibationWinForms/ProductsGrid.cs @@ -152,7 +152,7 @@ namespace LibationWinForms public void RefreshRow(string productId) { - var liveGridEntry = getRowItem((ge) => ge.AudibleProductId == productId); + var liveGridEntry = getGridEntry((ge) => ge.AudibleProductId == productId); // update GridEntry Liberate cell liveGridEntry?.NotifyPropertyChanged(nameof(liveGridEntry.Liberate)); @@ -196,7 +196,7 @@ namespace LibationWinForms #region DataGridView Macro - private GridEntry getRowItem(Func predicate) + private GridEntry getGridEntry(Func predicate) => ((SortableBindingList)gridEntryBindingSource.DataSource).FirstOrDefault(predicate); private GridEntry getGridEntry(int rowIndex) => _dataGridView.GetBoundItem(rowIndex);